Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gl: Check for GL_EXT_depth_bounds_test #8237

Merged
merged 2 commits into from May 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion rpcs3/Emu/RSX/GL/GLDraw.cpp
Expand Up @@ -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());
}
Expand Down
10 changes: 9 additions & 1 deletion rpcs3/Emu/RSX/GL/GLHelpers.h
Expand Up @@ -77,6 +77,7 @@ namespace gl
{
public:
bool EXT_dsa_supported = false;
bool EXT_depth_bounds_test = false;
bool ARB_dsa_supported = false;
bool ARB_buffer_storage_supported = false;
bool ARB_texture_buffer_supported = false;
Expand Down Expand Up @@ -106,7 +107,7 @@ namespace gl

void initialize()
{
int find_count = 11;
int find_count = 12;
int ext_count = 0;
glGetIntegerv(GL_NUM_EXTENSIONS, &ext_count);

Expand Down Expand Up @@ -192,6 +193,13 @@ namespace gl
find_count--;
continue;
}

if (check(ext_name, "GL_EXT_depth_bounds_test"))
{
EXT_depth_bounds_test = true;
find_count--;
continue;
}
}

// Workaround for intel drivers which have terrible capability reporting
Expand Down