From 0f97c2ec5190a15e32fe761c6b869f598493060d Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Wed, 27 Mar 2024 15:17:11 +0100 Subject: [PATCH] ntv: simplify increasing the number of dest componnets for sparse tex store_def doesn't use the number of components, so we can drop the checks for is_shador and simpliy increment the number of components. Signed-off-by: Gert Wollny Part-of: --- src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c index 52ac51bd2cc..a767cd2b884 100644 --- a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c +++ b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c @@ -3871,10 +3871,9 @@ emit_tex(struct ntv_context *ctx, nir_tex_instr *tex) result = emit_unop(ctx, SpvOpFConvert, dest_type, result); } - if (tex->is_sparse && tex->is_shadow) - tex->def.num_components++; store_def(ctx, tex->def.index, result, tex->dest_type); - if (tex->is_sparse && !tex->is_shadow) + + if (tex->is_sparse) tex->def.num_components++; }