From 2cee73f0f73c3a33b84ff36768ced6959f6dee99 Mon Sep 17 00:00:00 2001 From: Qiang Yu Date: Fri, 7 Jan 2022 17:37:27 +0800 Subject: [PATCH] nir: fix nir_tex_instr hash not count is_sparse field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes nir_opt_cse miss replace a non-sparse tex instruction with a sparse tex instruction and fail the nir_validate_shader(). Fixes: 3a7972f72a53 ("nir,spirv: add sparse texture fetches") Reviewed-by: Marek Olšák Signed-off-by: Qiang Yu Part-of: --- src/compiler/nir/nir_instr_set.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/nir/nir_instr_set.c b/src/compiler/nir/nir_instr_set.c index 86f73d64b79..39658ded8b3 100644 --- a/src/compiler/nir/nir_instr_set.c +++ b/src/compiler/nir/nir_instr_set.c @@ -272,6 +272,7 @@ hash_tex(uint32_t hash, const nir_tex_instr *instr) hash = HASH(hash, instr->is_array); hash = HASH(hash, instr->is_shadow); hash = HASH(hash, instr->is_new_style_shadow); + hash = HASH(hash, instr->is_sparse); unsigned component = instr->component; hash = HASH(hash, component); for (unsigned i = 0; i < 4; ++i)