From 9b41f846d662a54ada3b1b5af1b5cc15f879782f Mon Sep 17 00:00:00 2001 From: raven02 Date: Wed, 18 Mar 2015 05:33:27 +0800 Subject: [PATCH] Disable glDepthBoundsEXT for Intel HD graphics --- rpcs3/Emu/RSX/GL/GLGSRender.cpp | 12 +++++++++--- rpcs3/Emu/RSX/GL/GLGSRender.h | 3 ++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/rpcs3/Emu/RSX/GL/GLGSRender.cpp b/rpcs3/Emu/RSX/GL/GLGSRender.cpp index b1f0475d9d..02621598b8 100644 --- a/rpcs3/Emu/RSX/GL/GLGSRender.cpp +++ b/rpcs3/Emu/RSX/GL/GLGSRender.cpp @@ -1447,7 +1447,9 @@ void GLGSRender::OnInit() void GLGSRender::OnInitThread() { m_context = m_frame->GetNewContext(); - + + is_intel_vendor = strstr((const char*)glGetString(GL_VENDOR), "Intel"); + m_frame->SetCurrent(m_context); InitProcTable(); @@ -1750,7 +1752,6 @@ void GLGSRender::ExecCMD() Enable(m_set_depth_test, GL_DEPTH_TEST); Enable(m_set_alpha_test, GL_ALPHA_TEST); - Enable(m_set_depth_bounds_test, GL_DEPTH_BOUNDS_TEST_EXT); 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); @@ -1768,6 +1769,11 @@ void GLGSRender::ExecCMD() Enable(m_set_line_stipple, GL_LINE_STIPPLE); Enable(m_set_polygon_stipple, GL_POLYGON_STIPPLE); + if (!is_intel_vendor) + { + Enable(m_set_depth_bounds_test, GL_DEPTH_BOUNDS_TEST_EXT); + } + if (m_set_clip_plane) { Enable(m_clip_plane_0, GL_CLIP_PLANE0); @@ -1899,7 +1905,7 @@ void GLGSRender::ExecCMD() checkForGlError("glDepthFunc"); } - if (m_set_depth_bounds) + if (m_set_depth_bounds && !is_intel_vendor) { glDepthBoundsEXT(m_depth_bounds_min, m_depth_bounds_max); checkForGlError("glDepthBounds"); diff --git a/rpcs3/Emu/RSX/GL/GLGSRender.h b/rpcs3/Emu/RSX/GL/GLGSRender.h index a509664ded..409f9ae124 100644 --- a/rpcs3/Emu/RSX/GL/GLGSRender.h +++ b/rpcs3/Emu/RSX/GL/GLGSRender.h @@ -161,7 +161,8 @@ public: GSFrameBase* m_frame; u32 m_draw_frames; u32 m_skip_frames; - + bool is_intel_vendor; + GLGSRender(); virtual ~GLGSRender();