spirv: Add a debug option to force non uniform texture sampling

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20243>
This commit is contained in:
Konstantin Seurer
2022-12-10 12:36:57 +01:00
committed by Marge Bot
parent cdd68cbafd
commit 7a994d92ff
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -110,6 +110,9 @@ struct spirv_to_nir_options {
const char *message);
void *private_data;
} debug;
/* Force texture sampling to be non-uniform. */
bool force_tex_non_uniform;
};
bool gl_spirv_validation(const uint32_t *words, size_t word_count,
+3
View File
@@ -3104,6 +3104,9 @@ vtn_handle_texture(struct vtn_builder *b, SpvOp opcode,
if (operands & SpvImageOperandsNontemporalMask)
access |= ACCESS_STREAM_CACHE_POLICY;
if (sampler && b->options->force_tex_non_uniform)
access |= ACCESS_NON_UNIFORM;
if (sampled_val->propagated_non_uniform)
access |= ACCESS_NON_UNIFORM;