Module: Mesa Branch: master Commit: 6c6693e043adc90ce52fcd28d1b0ed8d6b2ade05 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6c6693e043adc90ce52fcd28d1b0ed8d6b2ade05
Author: Boris Brezillon <[email protected]> Date: Mon Oct 26 09:24:32 2020 +0100 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 <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7314> --- src/panfrost/bifrost/bifrost_compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) { _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
