st/mesa: Advertise GL_EXT_shader_framebuffer_fetch_non_coherent
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 24 Apr 2019 20:08:57 +0000 (13:08 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 23 May 2019 15:13:09 +0000 (08:13 -0700)
This extension requires the ability to read from all render targets,
so we only enable it if PIPE_CAP_FBFETCH >= PIPE_CAP_MAX_RENDER_TARGETS.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_extensions.c

index 98a3490d4df1e7e5d5c68918136a75a09d0f36c8..f442c08293bda8f183369e32d328ff6412c72a8b 100644 (file)
@@ -1398,6 +1398,11 @@ void st_init_extensions(struct pipe_screen *screen,
 
    if (max_fb_fetch_rts > 0) {
       extensions->KHR_blend_equation_advanced = true;
+
+      if (max_fb_fetch_rts >=
+          screen->get_param(screen, PIPE_CAP_MAX_RENDER_TARGETS)) {
+         extensions->EXT_shader_framebuffer_fetch_non_coherent = true;
+      }
    }
 
    consts->MaxViewports = screen->get_param(screen, PIPE_CAP_MAX_VIEWPORTS);