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:
committed by
Marge Bot
parent
cdd68cbafd
commit
7a994d92ff
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user