From: Kenneth Graunke Date: Wed, 24 Apr 2019 20:08:57 +0000 (-0700) Subject: st/mesa: Advertise GL_EXT_shader_framebuffer_fetch_non_coherent X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=87f42861372cdb3f82ba36b13467b157d8328ef5;p=mesa.git st/mesa: Advertise GL_EXT_shader_framebuffer_fetch_non_coherent 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 --- diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 98a3490d4df..f442c08293b 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -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);