mirror of https://github.com/RPCS3/rpcs3.git
Remove color mask
This commit is contained in:
parent
8dd19d1446
commit
403f585a19
|
@ -297,16 +297,13 @@ bool D3D12GSRender::LoadProgram()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_set_color_mask)
|
UINT8 mask = 0;
|
||||||
{
|
mask |= (rsx::method_registers[NV4097_SET_COLOR_MASK] >> 16) & 0xFF ? D3D12_COLOR_WRITE_ENABLE_RED : 0;
|
||||||
UINT8 mask = 0;
|
mask |= (rsx::method_registers[NV4097_SET_COLOR_MASK] >> 8) & 0xFF ? D3D12_COLOR_WRITE_ENABLE_GREEN : 0;
|
||||||
mask |= m_color_mask_r ? D3D12_COLOR_WRITE_ENABLE_RED : 0;
|
mask |= rsx::method_registers[NV4097_SET_COLOR_MASK] & 0xFF ? D3D12_COLOR_WRITE_ENABLE_BLUE : 0;
|
||||||
mask |= m_color_mask_g ? D3D12_COLOR_WRITE_ENABLE_GREEN : 0;
|
mask |= (rsx::method_registers[NV4097_SET_COLOR_MASK] >> 24) & 0xFF ? D3D12_COLOR_WRITE_ENABLE_ALPHA : 0;
|
||||||
mask |= m_color_mask_b ? D3D12_COLOR_WRITE_ENABLE_BLUE : 0;
|
for (unsigned i = 0; i < prop.numMRT; i++)
|
||||||
mask |= m_color_mask_a ? D3D12_COLOR_WRITE_ENABLE_ALPHA : 0;
|
prop.Blend.RenderTarget[i].RenderTargetWriteMask = mask;
|
||||||
for (unsigned i = 0; i < prop.numMRT; i++)
|
|
||||||
prop.Blend.RenderTarget[i].RenderTargetWriteMask = mask;
|
|
||||||
}
|
|
||||||
|
|
||||||
prop.IASet = m_IASet;
|
prop.IASet = m_IASet;
|
||||||
|
|
||||||
|
|
|
@ -1578,9 +1578,9 @@ void GLGSRender::clear_surface(u32 arg)
|
||||||
{
|
{
|
||||||
InitDrawBuffers();
|
InitDrawBuffers();
|
||||||
|
|
||||||
if (m_set_color_mask)
|
// if (m_set_color_mask)
|
||||||
{
|
{
|
||||||
glColorMask(m_color_mask_r, m_color_mask_g, m_color_mask_b, m_color_mask_a);
|
// glColorMask(m_color_mask_r, m_color_mask_g, m_color_mask_b, m_color_mask_a);
|
||||||
checkForGlError("glColorMask");
|
checkForGlError("glColorMask");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1638,9 +1638,9 @@ void GLGSRender::end()
|
||||||
|
|
||||||
InitDrawBuffers();
|
InitDrawBuffers();
|
||||||
|
|
||||||
if (m_set_color_mask)
|
// if (m_set_color_mask)
|
||||||
{
|
{
|
||||||
glColorMask(m_color_mask_r, m_color_mask_g, m_color_mask_b, m_color_mask_a);
|
// glColorMask(m_color_mask_r, m_color_mask_g, m_color_mask_b, m_color_mask_a);
|
||||||
checkForGlError("glColorMask");
|
checkForGlError("glColorMask");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -563,17 +563,8 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||||
|
|
||||||
// Color Mask
|
// Color Mask
|
||||||
case NV4097_SET_COLOR_MASK:
|
case NV4097_SET_COLOR_MASK:
|
||||||
{
|
|
||||||
const u32 a0 = ARGS(0);
|
|
||||||
|
|
||||||
m_set_color_mask = true;
|
|
||||||
m_color_mask_a = a0 & 0x1000000 ? true : false;
|
|
||||||
m_color_mask_r = a0 & 0x0010000 ? true : false;
|
|
||||||
m_color_mask_g = a0 & 0x0000100 ? true : false;
|
|
||||||
m_color_mask_b = a0 & 0x0000001 ? true : false;
|
|
||||||
notifyRasterizerStateChange();
|
notifyRasterizerStateChange();
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
case NV4097_SET_COLOR_MASK_MRT:
|
case NV4097_SET_COLOR_MASK_MRT:
|
||||||
{
|
{
|
||||||
|
|
|
@ -179,13 +179,6 @@ public:
|
||||||
// Dither
|
// Dither
|
||||||
bool m_set_dither;
|
bool m_set_dither;
|
||||||
|
|
||||||
// Color mask
|
|
||||||
bool m_set_color_mask;
|
|
||||||
bool m_color_mask_r;
|
|
||||||
bool m_color_mask_g;
|
|
||||||
bool m_color_mask_b;
|
|
||||||
bool m_color_mask_a;
|
|
||||||
|
|
||||||
// Clip
|
// Clip
|
||||||
bool m_set_clip;
|
bool m_set_clip;
|
||||||
float m_clip_min;
|
float m_clip_min;
|
||||||
|
@ -509,7 +502,7 @@ protected:
|
||||||
rsx::method_registers[NV4097_SET_DEPTH_FUNC] = 0x0201;
|
rsx::method_registers[NV4097_SET_DEPTH_FUNC] = 0x0201;
|
||||||
|
|
||||||
m_set_dither = false;
|
m_set_dither = false;
|
||||||
m_set_color_mask = false;
|
rsx::method_registers[NV4097_SET_COLOR_MASK] = -1;
|
||||||
m_set_clip = false;
|
m_set_clip = false;
|
||||||
m_set_depth_bounds_test = false;
|
m_set_depth_bounds_test = false;
|
||||||
m_set_depth_bounds = false;
|
m_set_depth_bounds = false;
|
||||||
|
|
|
@ -468,7 +468,7 @@ void SetupRsxRenderingStates(vm::ptr<CellGcmContextData>& cntxt)
|
||||||
{
|
{
|
||||||
//TODO: use cntxt
|
//TODO: use cntxt
|
||||||
GSRender& r = Emu.GetGSManager().GetRender();
|
GSRender& r = Emu.GetGSManager().GetRender();
|
||||||
r.m_set_color_mask = true; r.m_color_mask_a = r.m_color_mask_r = r.m_color_mask_g = r.m_color_mask_b = true;
|
rsx::method_registers[NV4097_SET_COLOR_MASK] = -1;
|
||||||
rsx::method_registers[NV4097_SET_DEPTH_MASK] = 0;
|
rsx::method_registers[NV4097_SET_DEPTH_MASK] = 0;
|
||||||
r.m_set_alpha_test = false;
|
r.m_set_alpha_test = false;
|
||||||
r.m_set_blend = false;
|
r.m_set_blend = false;
|
||||||
|
|
|
@ -601,11 +601,11 @@ void RSXDebugger::GetSettings()
|
||||||
render.m_blend_color_b,
|
render.m_blend_color_b,
|
||||||
render.m_blend_color_a));
|
render.m_blend_color_a));
|
||||||
LIST_SETTINGS_ADD("Clipping", wxString::Format("Min:%f, Max:%f", render.m_clip_min, render.m_clip_max));
|
LIST_SETTINGS_ADD("Clipping", wxString::Format("Min:%f, Max:%f", render.m_clip_min, render.m_clip_max));
|
||||||
LIST_SETTINGS_ADD("Color mask", !(render.m_set_color_mask) ? "(none)" : wxString::Format("R:%d, G:%d, B:%d, A:%d",
|
LIST_SETTINGS_ADD("Color mask", !(rsx::method_registers[NV4097_SET_COLOR_MASK]) ? "(none)" : wxString::Format("R:%d, G:%d, B:%d, A:%d",
|
||||||
render.m_color_mask_r,
|
(rsx::method_registers[NV4097_SET_COLOR_MASK] >> 16) & 0xff,
|
||||||
render.m_color_mask_g,
|
(rsx::method_registers[NV4097_SET_COLOR_MASK] >> 8) & 0xff,
|
||||||
render.m_color_mask_b,
|
(rsx::method_registers[NV4097_SET_COLOR_MASK]) & 0xff,
|
||||||
render.m_color_mask_a));
|
(rsx::method_registers[NV4097_SET_COLOR_MASK] >> 24) & 0xff));
|
||||||
LIST_SETTINGS_ADD("Context DMA Color A", wxString::Format("0x%x", render.m_context_dma_color_a));
|
LIST_SETTINGS_ADD("Context DMA Color A", wxString::Format("0x%x", render.m_context_dma_color_a));
|
||||||
LIST_SETTINGS_ADD("Context DMA Color B", wxString::Format("0x%x", render.m_context_dma_color_b));
|
LIST_SETTINGS_ADD("Context DMA Color B", wxString::Format("0x%x", render.m_context_dma_color_b));
|
||||||
LIST_SETTINGS_ADD("Context DMA Color C", wxString::Format("0x%x", render.m_context_dma_color_c));
|
LIST_SETTINGS_ADD("Context DMA Color C", wxString::Format("0x%x", render.m_context_dma_color_c));
|
||||||
|
|
Loading…
Reference in New Issue