From 0c6a667d9394c7bf0f5adef4320fd912653950af Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 10 Mar 2020 23:33:46 -0400 Subject: [PATCH] glsl_to_tgsi: set shader_info::writes_memory Acked-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 31ffa24958c..254f966b4e3 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -7344,6 +7344,14 @@ st_link_tgsi(struct gl_context *ctx, struct gl_shader_program *prog) st_set_prog_affected_state_flags(linked_prog); if (linked_prog) { + /* This is really conservative: */ + linked_prog->info.writes_memory = + linked_prog->info.num_ssbos || + linked_prog->info.num_images || + ctx->Extensions.ARB_bindless_texture || + (linked_prog->sh.LinkedTransformFeedback && + linked_prog->sh.LinkedTransformFeedback->NumVarying); + if (!ctx->Driver.ProgramStringNotify(ctx, _mesa_shader_stage_to_program(i), linked_prog)) { -- 2.30.2