mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-12 09:48:37 +12:00
Enable GL_SCISSOR_TEST and add glLogicOp
This commit is contained in:
parent
ec53f2557a
commit
967935d389
3 changed files with 32 additions and 19 deletions
|
@ -821,12 +821,6 @@ void GLGSRender::ExecCMD()
|
||||||
//checkForGlError("glViewport");
|
//checkForGlError("glViewport");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_set_scissor_horizontal && m_set_scissor_vertical)
|
|
||||||
{
|
|
||||||
glScissor(m_scissor_x, m_scissor_y, m_scissor_w, m_scissor_h);
|
|
||||||
checkForGlError("glScissor");
|
|
||||||
}
|
|
||||||
|
|
||||||
if(m_clear_surface_mask)
|
if(m_clear_surface_mask)
|
||||||
{
|
{
|
||||||
GLbitfield f = 0;
|
GLbitfield f = 0;
|
||||||
|
@ -859,18 +853,6 @@ void GLGSRender::ExecCMD()
|
||||||
glClear(f);
|
glClear(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_set_front_polygon_mode)
|
|
||||||
{
|
|
||||||
glPolygonMode(GL_FRONT, m_front_polygon_mode);
|
|
||||||
checkForGlError("glPolygonMode(Front)");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_set_back_polygon_mode)
|
|
||||||
{
|
|
||||||
glPolygonMode(GL_BACK, m_back_polygon_mode);
|
|
||||||
checkForGlError("glPolygonMode(Back)");
|
|
||||||
}
|
|
||||||
|
|
||||||
Enable(m_depth_test_enable, GL_DEPTH_TEST);
|
Enable(m_depth_test_enable, GL_DEPTH_TEST);
|
||||||
Enable(m_set_alpha_test, GL_ALPHA_TEST);
|
Enable(m_set_alpha_test, GL_ALPHA_TEST);
|
||||||
Enable(m_set_depth_bounds_test, GL_DEPTH_BOUNDS_TEST_EXT);
|
Enable(m_set_depth_bounds_test, GL_DEPTH_BOUNDS_TEST_EXT);
|
||||||
|
@ -879,6 +861,7 @@ void GLGSRender::ExecCMD()
|
||||||
Enable(m_set_cull_face_enable, GL_CULL_FACE);
|
Enable(m_set_cull_face_enable, GL_CULL_FACE);
|
||||||
Enable(m_set_dither, GL_DITHER);
|
Enable(m_set_dither, GL_DITHER);
|
||||||
Enable(m_set_stencil_test, GL_STENCIL_TEST);
|
Enable(m_set_stencil_test, GL_STENCIL_TEST);
|
||||||
|
Enable(m_set_scissor_horizontal && m_set_scissor_vertical, GL_SCISSOR_TEST);
|
||||||
Enable(m_set_line_smooth, GL_LINE_SMOOTH);
|
Enable(m_set_line_smooth, GL_LINE_SMOOTH);
|
||||||
Enable(m_set_poly_smooth, GL_POLYGON_SMOOTH);
|
Enable(m_set_poly_smooth, GL_POLYGON_SMOOTH);
|
||||||
Enable(m_set_poly_offset_fill, GL_POLYGON_OFFSET_FILL);
|
Enable(m_set_poly_offset_fill, GL_POLYGON_OFFSET_FILL);
|
||||||
|
@ -900,6 +883,30 @@ void GLGSRender::ExecCMD()
|
||||||
|
|
||||||
checkForGlError("glEnable");
|
checkForGlError("glEnable");
|
||||||
|
|
||||||
|
|
||||||
|
if (m_set_front_polygon_mode)
|
||||||
|
{
|
||||||
|
glPolygonMode(GL_FRONT, m_front_polygon_mode);
|
||||||
|
checkForGlError("glPolygonMode(Front)");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_set_back_polygon_mode)
|
||||||
|
{
|
||||||
|
glPolygonMode(GL_BACK, m_back_polygon_mode);
|
||||||
|
checkForGlError("glPolygonMode(Back)");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_set_logic_op)
|
||||||
|
{
|
||||||
|
glLogicOp(m_logic_op);
|
||||||
|
checkForGlError("glLogicOp");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_set_scissor_horizontal && m_set_scissor_vertical)
|
||||||
|
{
|
||||||
|
glScissor(m_scissor_x, m_scissor_y, m_scissor_w, m_scissor_h);
|
||||||
|
checkForGlError("glScissor");
|
||||||
|
}
|
||||||
if(m_set_two_sided_stencil_test_enable)
|
if(m_set_two_sided_stencil_test_enable)
|
||||||
{
|
{
|
||||||
if(m_set_stencil_fail && m_set_stencil_zfail && m_set_stencil_zpass)
|
if(m_set_stencil_fail && m_set_stencil_zfail && m_set_stencil_zpass)
|
||||||
|
|
|
@ -762,6 +762,10 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, mem32_ptr_t& args, const u3
|
||||||
m_set_logic_op = ARGS(0) ? true : false;
|
m_set_logic_op = ARGS(0) ? true : false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case NV4097_SET_LOGIC_OP:
|
||||||
|
m_logic_op = ARGS(0);
|
||||||
|
break;
|
||||||
|
|
||||||
case NV4097_SET_CULL_FACE_ENABLE:
|
case NV4097_SET_CULL_FACE_ENABLE:
|
||||||
m_set_cull_face_enable = ARGS(0) ? true : false;
|
m_set_cull_face_enable = ARGS(0) ? true : false;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -166,7 +166,6 @@ public:
|
||||||
bool m_set_blend;
|
bool m_set_blend;
|
||||||
bool m_set_depth_bounds_test;
|
bool m_set_depth_bounds_test;
|
||||||
bool m_depth_test_enable;
|
bool m_depth_test_enable;
|
||||||
bool m_set_logic_op;
|
|
||||||
bool m_set_cull_face_enable;
|
bool m_set_cull_face_enable;
|
||||||
bool m_set_dither;
|
bool m_set_dither;
|
||||||
bool m_set_stencil_test;
|
bool m_set_stencil_test;
|
||||||
|
@ -198,6 +197,9 @@ public:
|
||||||
bool m_set_back_polygon_mode;
|
bool m_set_back_polygon_mode;
|
||||||
u32 m_back_polygon_mode;
|
u32 m_back_polygon_mode;
|
||||||
|
|
||||||
|
bool m_set_logic_op;
|
||||||
|
u32 m_logic_op;
|
||||||
|
|
||||||
u32 m_clear_surface_mask;
|
u32 m_clear_surface_mask;
|
||||||
u32 m_clear_surface_z;
|
u32 m_clear_surface_z;
|
||||||
u8 m_clear_surface_s;
|
u8 m_clear_surface_s;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue