nvk: Only pass sampler handles when needed

Reviewed-by: Mel Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27755>
This commit is contained in:
Faith Ekstrand 2025-01-30 12:36:52 -06:00 committed by Marge Bot
parent 2be01df8df
commit 16b6ea415f

View file

@ -1278,7 +1278,7 @@ lower_tex(nir_builder *b, nir_tex_instr *tex,
load_resource_deref_desc(b, 1, 32, texture, plane_offset_B, ctx);
nir_def *combined_handle;
if (texture == sampler) {
if (texture == sampler || !nir_tex_instr_need_sampler(tex)) {
combined_handle = texture_desc;
} else {
combined_handle = nir_iand_imm(b, texture_desc,