mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 23:41:26 +12:00
Paritally fix depth read elf
This commit is contained in:
parent
a6bca0ecc5
commit
ee58ba9fd9
1 changed files with 27 additions and 24 deletions
|
@ -615,7 +615,11 @@ void GLGSRender::OnInitThread()
|
||||||
InitProcTable();
|
InitProcTable();
|
||||||
|
|
||||||
glEnable(GL_TEXTURE_2D);
|
glEnable(GL_TEXTURE_2D);
|
||||||
|
glEnable(GL_SCISSOR_TEST);
|
||||||
|
glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
|
||||||
|
glGenTextures(1, &g_depth_tex);
|
||||||
|
glGenTextures(1, &g_flip_tex);
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
glSwapInterval(Ini.GSVSyncEnable.GetValue() ? 1 : 0);
|
glSwapInterval(Ini.GSVSyncEnable.GetValue() ? 1 : 0);
|
||||||
// Undefined reference: glXSwapIntervalEXT
|
// Undefined reference: glXSwapIntervalEXT
|
||||||
|
@ -624,9 +628,7 @@ void GLGSRender::OnInitThread()
|
||||||
glXSwapIntervalEXT(glXGetCurrentDisplay(), drawable, Ini.GSVSyncEnable.GetValue() ? 1 : 0);
|
glXSwapIntervalEXT(glXGetCurrentDisplay(), drawable, Ini.GSVSyncEnable.GetValue() ? 1 : 0);
|
||||||
}*/
|
}*/
|
||||||
#endif
|
#endif
|
||||||
glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
|
|
||||||
glGenTextures(1, &g_depth_tex);
|
|
||||||
glGenTextures(1, &g_flip_tex);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLGSRender::OnExitThread()
|
void GLGSRender::OnExitThread()
|
||||||
|
@ -794,7 +796,13 @@ void GLGSRender::ExecCMD()
|
||||||
//glViewport(m_viewport_x, m_viewport_y, m_viewport_w, m_viewport_h);
|
//glViewport(m_viewport_x, m_viewport_y, m_viewport_w, m_viewport_h);
|
||||||
//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;
|
||||||
|
@ -835,7 +843,6 @@ void GLGSRender::ExecCMD()
|
||||||
Enable(m_set_cull_face, GL_CULL_FACE);
|
Enable(m_set_cull_face, 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_point_sprite_control, GL_POINT_SPRITE);
|
Enable(m_set_point_sprite_control, GL_POINT_SPRITE);
|
||||||
|
@ -890,12 +897,6 @@ void GLGSRender::ExecCMD()
|
||||||
checkForGlError("glLogicOp");
|
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)
|
||||||
|
@ -1125,6 +1126,13 @@ void GLGSRender::ExecCMD()
|
||||||
|
|
||||||
void GLGSRender::Flip()
|
void GLGSRender::Flip()
|
||||||
{
|
{
|
||||||
|
// Set scissor to FBO size
|
||||||
|
if (m_set_scissor_horizontal && m_set_scissor_vertical)
|
||||||
|
{
|
||||||
|
glScissor(0, 0, RSXThread::m_width, RSXThread::m_height);
|
||||||
|
checkForGlError("glScissor");
|
||||||
|
}
|
||||||
|
|
||||||
switch (m_surface_colour_target)
|
switch (m_surface_colour_target)
|
||||||
{
|
{
|
||||||
case CELL_GCM_SURFACE_TARGET_0:
|
case CELL_GCM_SURFACE_TARGET_0:
|
||||||
|
@ -1143,12 +1151,6 @@ void GLGSRender::Flip()
|
||||||
case CELL_GCM_SURFACE_TARGET_MRT3:
|
case CELL_GCM_SURFACE_TARGET_MRT3:
|
||||||
{
|
{
|
||||||
// Slow path for MRT/None target using glReadPixels.
|
// Slow path for MRT/None target using glReadPixels.
|
||||||
if (m_set_scissor_horizontal && m_set_scissor_vertical)
|
|
||||||
{
|
|
||||||
glScissor(0, 0, RSXThread::m_width, RSXThread::m_height);
|
|
||||||
checkForGlError("glScissor");
|
|
||||||
}
|
|
||||||
|
|
||||||
static u8* src_buffer = nullptr;
|
static u8* src_buffer = nullptr;
|
||||||
static u32 width = 0;
|
static u32 width = 0;
|
||||||
static u32 height = 0;
|
static u32 height = 0;
|
||||||
|
@ -1230,12 +1232,6 @@ void GLGSRender::Flip()
|
||||||
glVertex2i(0, 1);
|
glVertex2i(0, 1);
|
||||||
glEnd();
|
glEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_set_scissor_horizontal && m_set_scissor_vertical)
|
|
||||||
{
|
|
||||||
glScissor(m_scissor_x, m_scissor_y, m_scissor_w, m_scissor_h);
|
|
||||||
checkForGlError("glScissor");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1247,6 +1243,13 @@ void GLGSRender::Flip()
|
||||||
}
|
}
|
||||||
|
|
||||||
m_frame->Flip(m_context);
|
m_frame->Flip(m_context);
|
||||||
|
|
||||||
|
// Restore scissor
|
||||||
|
if (m_set_scissor_horizontal && m_set_scissor_vertical)
|
||||||
|
{
|
||||||
|
glScissor(m_scissor_x, m_scissor_y, m_scissor_w, m_scissor_h);
|
||||||
|
checkForGlError("glScissor");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue