diff options
author | Boris Brezillon <boris.brezillon@collabora.com> | 2020-10-26 09:24:32 +0100 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@collabora.com> | 2020-10-26 19:11:33 +0100 |
commit | 6c6693e043adc90ce52fcd28d1b0ed8d6b2ade05 (patch) | |
tree | 6811f940d644ce46af1c7a9b2218a1ee9db32149 | |
parent | eaed477652a07d608ea3c85f1b73f8d9c5f16a6e (diff) |
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: b83c293674c1 ("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>
-rw-r--r-- | src/panfrost/bifrost/bifrost_compile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index b1dcfe4a4e8..c2aa43d66ce 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -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)) { |