From 71552f7ffe6d387c661d7eed9b5fadabd5d3d748 Mon Sep 17 00:00:00 2001 From: Vincent Lejeune Date: Sat, 10 Oct 2015 00:59:41 +0200 Subject: [PATCH] Remove logic Op --- rpcs3/Emu/RSX/D3D12/D3D12PipelineState.cpp | 4 ++-- rpcs3/Emu/RSX/GL/GLGSRender.cpp | 6 +++--- rpcs3/Emu/RSX/RSXThread.cpp | 6 ------ rpcs3/Emu/RSX/RSXThread.h | 8 +------- rpcs3/Emu/SysCalls/Modules/cellResc.cpp | 2 +- rpcs3/Gui/RSXDebugger.cpp | 4 ++-- 6 files changed, 9 insertions(+), 21 deletions(-) diff --git a/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.cpp b/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.cpp index c987dd8e68..1d0ebf18c9 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.cpp +++ b/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.cpp @@ -176,10 +176,10 @@ bool D3D12GSRender::LoadProgram() } } - if (m_set_logic_op) + if (rsx::method_registers[NV4097_SET_LOGIC_OP_ENABLE]) { prop.Blend.RenderTarget[0].LogicOpEnable = true; - prop.Blend.RenderTarget[0].LogicOp = getLogicOp(m_logic_op); + prop.Blend.RenderTarget[0].LogicOp = getLogicOp(rsx::method_registers[NV4097_SET_LOGIC_OP]); } if (m_set_blend_color) diff --git a/rpcs3/Emu/RSX/GL/GLGSRender.cpp b/rpcs3/Emu/RSX/GL/GLGSRender.cpp index d45ea010f5..cbd8ae3917 100644 --- a/rpcs3/Emu/RSX/GL/GLGSRender.cpp +++ b/rpcs3/Emu/RSX/GL/GLGSRender.cpp @@ -1666,7 +1666,7 @@ void GLGSRender::end() Enable(m_set_alpha_test, GL_ALPHA_TEST); Enable(m_set_blend || m_set_blend_mrt1 || m_set_blend_mrt2 || m_set_blend_mrt3, GL_BLEND); Enable(m_set_scissor_horizontal && m_set_scissor_vertical, GL_SCISSOR_TEST); - Enable(m_set_logic_op, GL_LOGIC_OP); +// Enable(m_set_logic_op, GL_LOGIC_OP); Enable(m_set_cull_face, GL_CULL_FACE); Enable(m_set_dither, GL_DITHER); // Enable(m_set_stencil_test, GL_STENCIL_TEST); @@ -1724,9 +1724,9 @@ void GLGSRender::end() checkForGlError("glPolygonOffset"); } - if (m_set_logic_op) +// if (m_set_logic_op) { - glLogicOp(m_logic_op); +// glLogicOp(m_logic_op); checkForGlError("glLogicOp"); } diff --git a/rpcs3/Emu/RSX/RSXThread.cpp b/rpcs3/Emu/RSX/RSXThread.cpp index e16a17e347..eea62e2c47 100644 --- a/rpcs3/Emu/RSX/RSXThread.cpp +++ b/rpcs3/Emu/RSX/RSXThread.cpp @@ -1234,18 +1234,12 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const // Logic Ops case NV4097_SET_LOGIC_OP_ENABLE: - { - m_set_logic_op = ARGS(0) ? true : false; notifyBlendStateChange(); break; - } case NV4097_SET_LOGIC_OP: - { - m_logic_op = ARGS(0); notifyBlendStateChange(); break; - } // Dithering case NV4097_SET_DITHER_ENABLE: diff --git a/rpcs3/Emu/RSX/RSXThread.h b/rpcs3/Emu/RSX/RSXThread.h index 9e11be4762..be3ce8f2f6 100644 --- a/rpcs3/Emu/RSX/RSXThread.h +++ b/rpcs3/Emu/RSX/RSXThread.h @@ -245,10 +245,7 @@ public: bool m_set_polygon_stipple; u32 m_polygon_stipple_pattern[32]; - // Logic Ops - bool m_set_logic_op; - u32 m_logic_op; - + // Clearing u32 m_clear_surface_mask; @@ -435,7 +432,6 @@ protected: m_set_blend_mrt1 = false; m_set_blend_mrt2 = false; m_set_blend_mrt3 = false; - m_set_logic_op = false; m_set_cull_face = false; m_set_dither = false; m_set_scissor_horizontal = false; @@ -467,7 +463,6 @@ protected: m_cull_face = 0x0405; // GL_BACK m_alpha_func = 0x0207; // GL_ALWAYS m_alpha_ref = 0.0f; - m_logic_op = 0x1503; // GL_COPY m_shade_mode = 0x1D01; // GL_SMOOTH m_depth_bounds_min = 0.0; @@ -561,7 +556,6 @@ protected: m_set_specular = false; m_set_line_stipple = false; m_set_polygon_stipple = false; - m_set_logic_op = false; m_set_surface_format = false; m_set_surface_clip_horizontal = false; m_set_surface_clip_vertical = false; diff --git a/rpcs3/Emu/SysCalls/Modules/cellResc.cpp b/rpcs3/Emu/SysCalls/Modules/cellResc.cpp index 569f041d14..2e1358ce65 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellResc.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellResc.cpp @@ -473,7 +473,7 @@ void SetupRsxRenderingStates(vm::ptr& cntxt) r.m_set_alpha_test = false; r.m_set_blend = false; r.m_set_blend_mrt1 = r.m_set_blend_mrt2 = r.m_set_blend_mrt3 = false; - r.m_set_logic_op = false; +// r.m_set_logic_op = false; r.m_set_cull_face = false; r.m_set_depth_bounds_test = false; rsx::method_registers[NV4097_SET_DEPTH_TEST_ENABLE] = false; diff --git a/rpcs3/Gui/RSXDebugger.cpp b/rpcs3/Gui/RSXDebugger.cpp index 3fd29dac7e..b0de82ceda 100644 --- a/rpcs3/Gui/RSXDebugger.cpp +++ b/rpcs3/Gui/RSXDebugger.cpp @@ -501,7 +501,7 @@ void RSXDebugger::GetFlags() // LIST_FLAGS_ADD("Depth test", render.m_set_depth_test); LIST_FLAGS_ADD("Dither", render.m_set_dither); LIST_FLAGS_ADD("Line smooth", render.m_set_line_smooth); - LIST_FLAGS_ADD("Logic op", render.m_set_logic_op); +// LIST_FLAGS_ADD("Logic op", render.m_set_logic_op); LIST_FLAGS_ADD("Poly smooth", render.m_set_poly_smooth); LIST_FLAGS_ADD("Poly offset fill", render.m_set_poly_offset_fill); LIST_FLAGS_ADD("Poly offset line", render.m_set_poly_offset_line); @@ -658,7 +658,7 @@ void RSXDebugger::SetFlags(wxListEvent& event) // case 4: render.m_set_depth_test ^= true; break; case 5: render.m_set_dither ^= true; break; case 6: render.m_set_line_smooth ^= true; break; - case 7: render.m_set_logic_op ^= true; break; +// case 7: render.m_set_logic_op ^= true; break; case 8: render.m_set_poly_smooth ^= true; break; case 9: render.m_set_poly_offset_fill ^= true; break; case 10: render.m_set_poly_offset_line ^= true; break;