Module: Mesa Branch: main Commit: 53f38d36835a72acc83eb9a47422651789de4125 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=53f38d36835a72acc83eb9a47422651789de4125
Author: Caio Oliveira <[email protected]> Date: Mon Sep 20 11:10:10 2021 -0700 spirv: Identify non-temporal image operand added in SPIR-V 1.6 Map it to the existing ACCESS_STREAM_CACHE_POLICY access mode. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14209> --- src/compiler/spirv/spirv_to_nir.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 502977e35e6..f804031a200 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -3078,6 +3078,9 @@ vtn_handle_texture(struct vtn_builder *b, SpvOp opcode, enum gl_access_qualifier access = 0; vtn_foreach_decoration(b, sampled_val, non_uniform_decoration_cb, &access); + if (operands & SpvImageOperandsNontemporalMask) + access |= ACCESS_STREAM_CACHE_POLICY; + if (sampled_val->propagated_non_uniform) access |= ACCESS_NON_UNIFORM; @@ -3329,6 +3332,8 @@ vtn_handle_image(struct vtn_builder *b, SpvOp opcode, if (operands & SpvImageOperandsVolatileTexelMask) access |= ACCESS_VOLATILE; + if (operands & SpvImageOperandsNontemporalMask) + access |= ACCESS_STREAM_CACHE_POLICY; break; } @@ -3369,6 +3374,8 @@ vtn_handle_image(struct vtn_builder *b, SpvOp opcode, if (operands & SpvImageOperandsVolatileTexelMask) access |= ACCESS_VOLATILE; + if (operands & SpvImageOperandsNontemporalMask) + access |= ACCESS_STREAM_CACHE_POLICY; break; }
