From 87f42861372cdb3f82ba36b13467b157d8328ef5 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 24 Apr 2019 13:08:57 -0700 Subject: [PATCH] st/mesa: Advertise GL_EXT_shader_framebuffer_fetch_non_coherent MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/mesa/state_tracker/st_extensions.c | 5 +++++ 1 file changed, 5 insertions(+) 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); -- 2.30.2