RenderBase: Drop SetColorMask and SetLogicOpMode
These are now incorporated into the blend state for all backends.
This commit is contained in:
parent
5c9bc8b79c
commit
22b8cbae35
|
@ -75,16 +75,6 @@ void SetBlendMode()
|
||||||
g_renderer->SetBlendMode(false);
|
g_renderer->SetBlendMode(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetLogicOpMode()
|
|
||||||
{
|
|
||||||
g_renderer->SetLogicOpMode();
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetColorMask()
|
|
||||||
{
|
|
||||||
g_renderer->SetColorMask();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Explanation of the magic behind ClearScreen:
|
/* Explanation of the magic behind ClearScreen:
|
||||||
There's numerous possible formats for the pixel data in the EFB.
|
There's numerous possible formats for the pixel data in the EFB.
|
||||||
However, in the HW accelerated backends we're always using RGBA8
|
However, in the HW accelerated backends we're always using RGBA8
|
||||||
|
|
|
@ -19,8 +19,6 @@ void SetGenerationMode();
|
||||||
void SetScissor();
|
void SetScissor();
|
||||||
void SetDepthMode();
|
void SetDepthMode();
|
||||||
void SetBlendMode();
|
void SetBlendMode();
|
||||||
void SetLogicOpMode();
|
|
||||||
void SetColorMask();
|
|
||||||
void ClearScreen(const EFBRectangle& rc);
|
void ClearScreen(const EFBRectangle& rc);
|
||||||
void OnPixelFormatChange();
|
void OnPixelFormatChange();
|
||||||
void SetInterlacingMode(const BPCmd& bp);
|
void SetInterlacingMode(const BPCmd& bp);
|
||||||
|
|
|
@ -148,17 +148,7 @@ static void BPWritten(const BPCmd& bp)
|
||||||
bpmem.blendmode.dstfactor.Value(), bpmem.blendmode.srcfactor.Value(),
|
bpmem.blendmode.dstfactor.Value(), bpmem.blendmode.srcfactor.Value(),
|
||||||
bpmem.blendmode.subtract.Value(), bpmem.blendmode.logicmode.Value());
|
bpmem.blendmode.subtract.Value(), bpmem.blendmode.logicmode.Value());
|
||||||
|
|
||||||
// Set Blending Mode
|
SetBlendMode();
|
||||||
if (bp.changes)
|
|
||||||
SetBlendMode();
|
|
||||||
|
|
||||||
// Set LogicOp Blending Mode
|
|
||||||
if (bp.changes & 0xF002) // logicopenable | logicmode
|
|
||||||
SetLogicOpMode();
|
|
||||||
|
|
||||||
// Set Color Mask
|
|
||||||
if (bp.changes & 0x18) // colorupdate | alphaupdate
|
|
||||||
SetColorMask();
|
|
||||||
|
|
||||||
// Dither
|
// Dither
|
||||||
if (bp.changes & 0x04)
|
if (bp.changes & 0x04)
|
||||||
|
@ -331,7 +321,6 @@ static void BPWritten(const BPCmd& bp)
|
||||||
if (bp.changes)
|
if (bp.changes)
|
||||||
{
|
{
|
||||||
PixelShaderManager::SetAlphaTestChanged();
|
PixelShaderManager::SetAlphaTestChanged();
|
||||||
g_renderer->SetColorMask();
|
|
||||||
SetBlendMode();
|
SetBlendMode();
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -420,11 +409,7 @@ static void BPWritten(const BPCmd& bp)
|
||||||
case BPMEM_ZCOMPARE: // Set the Z-Compare and EFB pixel format
|
case BPMEM_ZCOMPARE: // Set the Z-Compare and EFB pixel format
|
||||||
OnPixelFormatChange();
|
OnPixelFormatChange();
|
||||||
if (bp.changes & 7)
|
if (bp.changes & 7)
|
||||||
{
|
|
||||||
SetBlendMode(); // dual source could be activated by changing to PIXELFMT_RGBA6_Z24
|
SetBlendMode(); // dual source could be activated by changing to PIXELFMT_RGBA6_Z24
|
||||||
g_renderer->SetColorMask(); // alpha writing needs to be disabled if the new pixel format
|
|
||||||
// doesn't have an alpha channel
|
|
||||||
}
|
|
||||||
PixelShaderManager::SetZModeControl();
|
PixelShaderManager::SetZModeControl();
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -1414,8 +1399,6 @@ void BPReload()
|
||||||
SetGenerationMode();
|
SetGenerationMode();
|
||||||
SetScissor();
|
SetScissor();
|
||||||
SetDepthMode();
|
SetDepthMode();
|
||||||
SetLogicOpMode();
|
|
||||||
SetBlendMode();
|
SetBlendMode();
|
||||||
SetColorMask();
|
|
||||||
OnPixelFormatChange();
|
OnPixelFormatChange();
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,12 +63,10 @@ public:
|
||||||
PP_EFB_COPY_CLOCKS
|
PP_EFB_COPY_CLOCKS
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual void SetColorMask() {}
|
|
||||||
virtual void SetBlendMode(bool forceUpdate) {}
|
virtual void SetBlendMode(bool forceUpdate) {}
|
||||||
virtual void SetScissorRect(const EFBRectangle& rc) {}
|
virtual void SetScissorRect(const EFBRectangle& rc) {}
|
||||||
virtual void SetGenerationMode() {}
|
virtual void SetGenerationMode() {}
|
||||||
virtual void SetDepthMode() {}
|
virtual void SetDepthMode() {}
|
||||||
virtual void SetLogicOpMode() {}
|
|
||||||
virtual void SetSamplerState(int stage, int texindex, bool custom_tex) {}
|
virtual void SetSamplerState(int stage, int texindex, bool custom_tex) {}
|
||||||
virtual void SetInterlacingMode() {}
|
virtual void SetInterlacingMode() {}
|
||||||
virtual void SetViewport() {}
|
virtual void SetViewport() {}
|
||||||
|
|
Loading…
Reference in New Issue