mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 18:40:13 +01:00
pan/bi: Fix ms_idx type to catch missing ms_index source
nir_tex_instr_src_index() returns a negative result when the requested
source does not exist, but we cast that to an unsigned type thus losing
this information.
Fixes: b83c293674 ("pan/bi: Add basic support for txf_ms")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7314>
This commit is contained in:
parent
eaed477652
commit
6c6693e043
1 changed files with 1 additions and 1 deletions
|
|
@ -1362,7 +1362,7 @@ bi_emit_tex_offset_ms_index(bi_context *ctx, nir_tex_instr *instr)
|
|||
/* TODO: offsets */
|
||||
assert(nir_tex_instr_src_index(instr, nir_tex_src_offset) < 0);
|
||||
|
||||
unsigned ms_idx = nir_tex_instr_src_index(instr, nir_tex_src_ms_index);
|
||||
int ms_idx = nir_tex_instr_src_index(instr, nir_tex_src_ms_index);
|
||||
if (ms_idx >= 0 &&
|
||||
(!nir_src_is_const(instr->src[ms_idx].src) ||
|
||||
nir_src_as_uint(instr->src[ms_idx].src) != 0)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue