mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-09 17:17:11 +00:00
Make sure enable bits in GL render state are properly extension guarded
This commit is contained in:
@@ -211,7 +211,8 @@ extern bool GLIsCore;
|
||||
EXT_TO_CHECK(ARB_explicit_attrib_location) \
|
||||
EXT_TO_CHECK(ARB_vertex_attrib_binding) \
|
||||
EXT_TO_CHECK(ARB_sampler_objects) \
|
||||
EXT_TO_CHECK(KHR_debug)
|
||||
EXT_TO_CHECK(KHR_debug) \
|
||||
EXT_TO_CHECK(ARB_sample_shading)
|
||||
|
||||
// extensions we know we want to check for are precached, indexd by this enum
|
||||
enum ExtensionCheckEnum
|
||||
|
||||
@@ -584,6 +584,12 @@ void GLRenderState::FetchState(void *ctx, WrappedOpenGL *gl)
|
||||
continue;
|
||||
}
|
||||
|
||||
if(pnames[i] == eGL_SAMPLE_SHADING && !ExtensionSupported[GLExt_ARB_sample_shading])
|
||||
{
|
||||
Enabled[i] = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
Enabled[i] = (m_Real->glIsEnabled(pnames[i]) == GL_TRUE);
|
||||
}
|
||||
}
|
||||
@@ -957,6 +963,9 @@ void GLRenderState::ApplyState(void *ctx, WrappedOpenGL *gl)
|
||||
if(pnames[i] == eGL_DEPTH_BOUNDS_TEST_EXT && !ExtensionSupported[GLExt_EXT_depth_bounds_test])
|
||||
continue;
|
||||
|
||||
if(pnames[i] == eGL_SAMPLE_SHADING && !ExtensionSupported[GLExt_ARB_sample_shading])
|
||||
continue;
|
||||
|
||||
if(Enabled[i])
|
||||
m_Real->glEnable(pnames[i]);
|
||||
else
|
||||
@@ -1168,7 +1177,7 @@ void GLRenderState::ApplyState(void *ctx, WrappedOpenGL *gl)
|
||||
m_Real->glDepthRangeArrayv(i, 1, v);
|
||||
}
|
||||
|
||||
if(m_Real->glDepthBoundsEXT) // extension, not always available
|
||||
if(ExtensionSupported[GLExt_EXT_depth_bounds_test] && m_Real->glDepthBoundsEXT)
|
||||
m_Real->glDepthBoundsEXT(DepthBounds.nearZ, DepthBounds.farZ);
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user