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 <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28502>
This commit is contained in:
Gert Wollny
2024-03-27 15:17:11 +01:00
committed by Marge Bot
parent 0aa6c4437c
commit 0f97c2ec51
@@ -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++;
}