From: Marek Olšák Date: Wed, 11 Mar 2020 03:33:46 +0000 (-0400) Subject: glsl_to_tgsi: set shader_info::writes_memory X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0c6a667d9394c7bf0f5adef4320fd912653950af;p=mesa.git glsl_to_tgsi: set shader_info::writes_memory Acked-by: Pierre-Eric Pelloux-Prayer Part-of: --- 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)) {