summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2020-03-10 23:33:46 -0400
committerMarek Olšák <[email protected]>2020-03-26 03:08:34 -0400
commit0c6a667d9394c7bf0f5adef4320fd912653950af (patch)
treea2dcbd03ca38d683b0085eaaf950fc995a8ee8ed
parent85a723975bbd651fa6692655b9a4f14b4405d0ae (diff)
glsl_to_tgsi: set shader_info::writes_memory
Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4152>
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp8
1 files changed, 8 insertions, 0 deletions
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)) {