mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Move alpha pretest to BPMemory.h and rename a bunch of alpha testing related stuff
This commit is contained in:
@ -128,8 +128,8 @@ void VertexManager::vFlush()
|
||||
xfregs.postMtxInfo[i].index, xfregs.postMtxInfo[i].normalize);
|
||||
}
|
||||
|
||||
PRIM_LOG("pixel: tev=%d, ind=%d, texgen=%d, dstalpha=%d, alphafunc=0x%x", bpmem.genMode.numtevstages+1, bpmem.genMode.numindstages,
|
||||
bpmem.genMode.numtexgens, (u32)bpmem.dstalpha.enable, (bpmem.alphaFunc.hex>>16)&0xff);
|
||||
PRIM_LOG("pixel: tev=%d, ind=%d, texgen=%d, dstalpha=%d, alphatest=0x%x", bpmem.genMode.numtevstages+1, bpmem.genMode.numindstages,
|
||||
bpmem.genMode.numtexgens, (u32)bpmem.dstalpha.enable, (bpmem.alpha_test.hex>>16)&0xff);
|
||||
#endif
|
||||
|
||||
(void)GL_REPORT_ERROR();
|
||||
|
@ -433,10 +433,10 @@ static bool AlphaCompare(int alpha, int ref, int comp)
|
||||
|
||||
static bool AlphaTest(int alpha)
|
||||
{
|
||||
bool comp0 = AlphaCompare(alpha, bpmem.alphaFunc.ref0, bpmem.alphaFunc.comp0);
|
||||
bool comp1 = AlphaCompare(alpha, bpmem.alphaFunc.ref1, bpmem.alphaFunc.comp1);
|
||||
bool comp0 = AlphaCompare(alpha, bpmem.alpha_test.ref0, bpmem.alpha_test.comp0);
|
||||
bool comp1 = AlphaCompare(alpha, bpmem.alpha_test.ref1, bpmem.alpha_test.comp1);
|
||||
|
||||
switch (bpmem.alphaFunc.logic) {
|
||||
switch (bpmem.alpha_test.logic) {
|
||||
case 0: return comp0 && comp1; // and
|
||||
case 1: return comp0 || comp1; // or
|
||||
case 2: return comp0 ^ comp1; // xor
|
||||
|
Reference in New Issue
Block a user