typedef void(__cdecl *PFN_SO_FUNC)(SWR_STREAMOUT_CONTEXT& soContext);
typedef void(__cdecl *PFN_PIXEL_KERNEL)(HANDLE hPrivateData, SWR_PS_CONTEXT *pContext);
typedef void(__cdecl *PFN_CPIXEL_KERNEL)(HANDLE hPrivateData, SWR_PS_CONTEXT *pContext);
-typedef void(__cdecl *PFN_BLEND_JIT_FUNC)(const SWR_BLEND_STATE*, simdvector&, simdvector&, uint32_t, uint8_t*, simdvector&, simdscalari*, simdscalari*);
+typedef void(__cdecl *PFN_BLEND_JIT_FUNC)(const SWR_BLEND_STATE*,
+ simdvector& vSrc, simdvector& vSrc1, simdscalar& vSrc0Alpha, uint32_t sample,
+ uint8_t* pDst, simdvector& vResult, simdscalari* vOMask, simdscalari* vCoverageMask);
typedef simdscalar(*PFN_QUANTIZE_DEPTH)(simdscalar);
+
+
//////////////////////////////////////////////////////////////////////////
/// FRONTEND_STATE
/////////////////////////////////////////////////////////////////////////
}
}
- void AlphaTest(const BLEND_COMPILE_STATE& state, Value* pBlendState, Value* pAlpha, Value* ppMask)
+ void AlphaTest(const BLEND_COMPILE_STATE& state, Value* pBlendState, Value* ppAlpha, Value* ppMask)
{
// load uint32_t reference
Value* pRef = VBROADCAST(LOAD(pBlendState, { 0, SWR_BLEND_STATE_alphaTestReference }));
+
+ // load alpha
+ Value* pAlpha = LOAD(ppAlpha);
Value* pTest = nullptr;
if (state.alphaTestFormat == ALPHA_TEST_UNORM8)
PointerType::get(Gen_SWR_BLEND_STATE(JM()), 0), // SWR_BLEND_STATE*
PointerType::get(mSimdFP32Ty, 0), // simdvector& src
PointerType::get(mSimdFP32Ty, 0), // simdvector& src1
+ PointerType::get(mSimdFP32Ty, 0), // src0alpha
Type::getInt32Ty(JM()->mContext), // sampleNum
PointerType::get(mSimdFP32Ty, 0), // uint8_t* pDst
PointerType::get(mSimdFP32Ty, 0), // simdvector& result
pSrc->setName("src");
Value* pSrc1 = &*argitr++;
pSrc1->setName("src1");
+ Value* pSrc0Alpha = &*argitr++;
+ pSrc0Alpha->setName("src0alpha");
Value* sampleNum = &*argitr++;
sampleNum->setName("sampleNum");
Value* pDst = &*argitr++;
// alpha test
if (state.desc.alphaTestEnable)
{
- AlphaTest(state, pBlendState, src[3], ppMask);
+ AlphaTest(state, pBlendState, pSrc0Alpha, ppMask);
}
// color blend