pan/decode: Check for correct unknown field
authorTomeu Vizoso <tomeu.vizoso@collabora.com>
Mon, 27 Apr 2020 14:09:57 +0000 (16:09 +0200)
committerTomeu Vizoso <tomeu.vizoso@collabora.com>
Thu, 30 Apr 2020 14:27:42 +0000 (16:27 +0200)
As reported by Coverity:

>>>     CID 1462606:  Incorrect expression  (COPY_PASTE_ERROR)
>>>     "unk1" in "s->unk1" looks like a copy-paste error.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4724>

src/panfrost/pandecode/decode.c

index faa01cd751794016d041953e7a32af374209ada9..32effb30f1815096083544513d27c9c7b6b466e9 100644 (file)
@@ -2422,7 +2422,7 @@ pandecode_samplers(mali_ptr samplers, unsigned sampler_count, int job_no, bool i
                         pandecode_prop("wrap_t = %s", pandecode_wrap_mode(s->wrap_t));
                         pandecode_prop("wrap_r = %s", pandecode_wrap_mode(s->wrap_r));
 
-                        if (s->unk1 != 0x8) {
+                        if (s->unk8 != 0x8) {
                                 pandecode_msg("XXX: unk8 tripped\n");
                                 pandecode_prop("unk8 = 0x%x", s->unk8);
                         }