From: Nicolai Hähnle Date: Sun, 13 Mar 2016 02:47:35 +0000 (-0500) Subject: st/glsl_to_tgsi: set memory access type on image intrinsics X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1c0cee87640506414be0e759f6ad6c74a3c7e5af;p=mesa.git st/glsl_to_tgsi: set memory access type on image intrinsics This is required to preserve the image variable's coherent/restrict/volatile qualifiers in TGSI. Reviewed-by: Ilia Mirkin Reviewed-by: Marek Olšák --- diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index fcfd8b7ae92..18cea60fc74 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -3616,6 +3616,13 @@ glsl_to_tgsi_visitor::visit_image_intrinsic(ir_call *ir) inst->image_format = st_mesa_format_to_pipe_format(st_context(ctx), _mesa_get_shader_image_format(imgvar->data.image_format)); + + if (imgvar->data.image_coherent) + inst->buffer_access |= TGSI_MEMORY_COHERENT; + if (imgvar->data.image_restrict) + inst->buffer_access |= TGSI_MEMORY_RESTRICT; + if (imgvar->data.image_volatile) + inst->buffer_access |= TGSI_MEMORY_VOLATILE; } void