pan/bi: assert indices when offsets are present in bi_emit_tex_valhall

This should always be 0 as lower_index_to_offset is expected to be set.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27846>
This commit is contained in:
Mary Guillemard 2024-01-29 12:46:40 +01:00 committed by Marge Bot
parent c7202751ad
commit 05607311fe

View file

@ -3519,10 +3519,16 @@ bi_emit_tex_valhall(bi_builder *b, nir_tex_instr *instr)
break;
case nir_tex_src_texture_offset:
/* This should always be 0 as lower_index_to_offset is expected to be
* set */
assert(instr->texture_index == 0);
texture = index;
break;
case nir_tex_src_sampler_offset:
/* This should always be 0 as lower_index_to_offset is expected to be
* set */
assert(instr->sampler_index == 0);
sampler = index;
break;