gl: Check for EXT_depth_bounds_test

Avoid glEnable/glDisable GL_DEPTH_BOUNDS_TEST_EXT flood that returns 
GL_INVALID_ENUM if the feature isn't supported
This commit is contained in:
Ani 2020-05-16 11:28:54 +01:00
parent 99f5145aab
commit 661636efef
2 changed files with 10 additions and 2 deletions

View file

@ -162,7 +162,7 @@ void GLGSRender::update_draw_state()
gl_state.depth_func(gl::comparison_op(rsx::method_registers.depth_func()));
}
if (glDepthBoundsEXT && (gl_state.enable(rsx::method_registers.depth_bounds_test_enabled(), GL_DEPTH_BOUNDS_TEST_EXT)))
if (gl::get_driver_caps().EXT_depth_bounds_test && (gl_state.enable(rsx::method_registers.depth_bounds_test_enabled(), GL_DEPTH_BOUNDS_TEST_EXT)))
{
gl_state.depth_bounds(rsx::method_registers.depth_bounds_min(), rsx::method_registers.depth_bounds_max());
}