GPU: Disable Multi-Bindings for AMD Official Drivers
AMD official driver reports that they support multi-bindings, but in the cases we are using it it fails. This is noticable in Eevee- next where the shadows aren't rendered. This fix disables multi-bindings for images for AMD Official drivers n all OS's. Textures will still use multi-bindings. Pull Request: https://projects.blender.org/blender/blender/pulls/110882
This commit is contained in:
@@ -244,6 +244,7 @@ static void detect_workarounds()
|
||||
GLContext::layered_rendering_support = false;
|
||||
GLContext::native_barycentric_support = false;
|
||||
GLContext::multi_bind_support = false;
|
||||
GLContext::multi_bind_image_support = false;
|
||||
GLContext::multi_draw_indirect_support = false;
|
||||
GLContext::shader_draw_parameters_support = false;
|
||||
GLContext::texture_cube_map_array_support = false;
|
||||
@@ -452,6 +453,12 @@ static void detect_workarounds()
|
||||
GCaps.clear_viewport_workaround = true;
|
||||
}
|
||||
|
||||
/* There is an issue in AMD official driver where we cannot use multi bind when using images. AMD
|
||||
* is aware of the issue, but hasn't released a fix. */
|
||||
if (GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_ANY, GPU_DRIVER_OFFICIAL)) {
|
||||
GLContext::multi_bind_image_support = false;
|
||||
}
|
||||
|
||||
/* Metal-related Workarounds. */
|
||||
|
||||
/* Minimum Per-Vertex stride is 1 byte for OpenGL. */
|
||||
@@ -486,6 +493,7 @@ bool GLContext::fixed_restart_index_support = false;
|
||||
bool GLContext::layered_rendering_support = false;
|
||||
bool GLContext::native_barycentric_support = false;
|
||||
bool GLContext::multi_bind_support = false;
|
||||
bool GLContext::multi_bind_image_support = false;
|
||||
bool GLContext::multi_draw_indirect_support = false;
|
||||
bool GLContext::shader_draw_parameters_support = false;
|
||||
bool GLContext::stencil_texturing_support = false;
|
||||
@@ -587,7 +595,8 @@ void GLBackend::capabilities_init()
|
||||
GLContext::layered_rendering_support = epoxy_has_gl_extension("GL_AMD_vertex_shader_layer");
|
||||
GLContext::native_barycentric_support = epoxy_has_gl_extension(
|
||||
"GL_AMD_shader_explicit_vertex_parameter");
|
||||
GLContext::multi_bind_support = epoxy_has_gl_extension("GL_ARB_multi_bind");
|
||||
GLContext::multi_bind_support = GLContext::multi_bind_image_support = epoxy_has_gl_extension(
|
||||
"GL_ARB_multi_bind");
|
||||
GLContext::multi_draw_indirect_support = epoxy_has_gl_extension("GL_ARB_multi_draw_indirect");
|
||||
GLContext::shader_draw_parameters_support = epoxy_has_gl_extension(
|
||||
"GL_ARB_shader_draw_parameters");
|
||||
|
||||
@@ -59,6 +59,7 @@ class GLContext : public Context {
|
||||
static bool layered_rendering_support;
|
||||
static bool native_barycentric_support;
|
||||
static bool multi_bind_support;
|
||||
static bool multi_bind_image_support;
|
||||
static bool multi_draw_indirect_support;
|
||||
static bool shader_draw_parameters_support;
|
||||
static bool stencil_texturing_support;
|
||||
|
||||
@@ -610,7 +610,7 @@ void GLStateManager::image_bind_apply()
|
||||
int last = 32 - bitscan_reverse_uint(dirty_bind);
|
||||
int count = last - first;
|
||||
|
||||
if (GLContext::multi_bind_support) {
|
||||
if (GLContext::multi_bind_image_support) {
|
||||
glBindImageTextures(first, count, images_ + first);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user