diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-08-31 12:18:12 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-08-31 12:35:18 +0300 |
commit | 5a60535a20393a4215f7a03fe77d927bacb71438 (patch) | |
tree | ac0f5f141c916b9babc3a639721815272c8f5826 /source/blender/gpu/opengl | |
parent | 41f439a7371df53fc79497fac2e771db599b8531 (diff) |
GPUCapabilities: Add GPU_shader_draw_parameters_support
This checks for the availability of `gl_BaseInstanceARB` or equivalent.
Disabling for any workaround that disables shader_image_load_store_support
as a preventive measure.
Diffstat (limited to 'source/blender/gpu/opengl')
-rw-r--r-- | source/blender/gpu/opengl/gl_backend.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/gpu/opengl/gl_backend.cc b/source/blender/gpu/opengl/gl_backend.cc index 6a1577fb907..24ca8c25bc0 100644 --- a/source/blender/gpu/opengl/gl_backend.cc +++ b/source/blender/gpu/opengl/gl_backend.cc @@ -227,6 +227,7 @@ static void detect_workarounds() GLContext::unused_fb_slot_workaround = true; /* Turn off extensions. */ GCaps.shader_image_load_store_support = false; + GCaps.shader_draw_parameters_support = false; GCaps.shader_storage_buffer_objects_support = false; GLContext::base_instance_support = false; GLContext::clear_texture_support = false; @@ -271,6 +272,7 @@ static void detect_workarounds() GLContext::unused_fb_slot_workaround = true; GCaps.mip_render_workaround = true; GCaps.shader_image_load_store_support = false; + GCaps.shader_draw_parameters_support = false; GCaps.broken_amd_driver = true; } /* Compute shaders have some issues with those versions (see T94936). */ @@ -284,12 +286,14 @@ static void detect_workarounds() strstr(renderer, "AMD TAHITI"))) { GLContext::unused_fb_slot_workaround = true; GCaps.shader_image_load_store_support = false; + GCaps.shader_draw_parameters_support = false; GCaps.broken_amd_driver = true; } /* Fix slowdown on this particular driver. (see T77641) */ if (GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_UNIX, GPU_DRIVER_OPENSOURCE) && strstr(version, "Mesa 19.3.4")) { GCaps.shader_image_load_store_support = false; + GCaps.shader_draw_parameters_support = false; GCaps.broken_amd_driver = true; } /* See T82856: AMD drivers since 20.11 running on a polaris architecture doesn't support the @@ -492,6 +496,7 @@ void GLBackend::capabilities_init() GCaps.mem_stats_support = epoxy_has_gl_extension("GL_NVX_gpu_memory_info") || epoxy_has_gl_extension("GL_ATI_meminfo"); GCaps.shader_image_load_store_support = epoxy_has_gl_extension("GL_ARB_shader_image_load_store"); + GCaps.shader_draw_parameters_support = epoxy_has_gl_extension("GL_ARB_shader_draw_parameters"); GCaps.compute_shader_support = epoxy_has_gl_extension("GL_ARB_compute_shader") && epoxy_gl_version() >= 43; if (GCaps.compute_shader_support) { |