panfrost: Fix norm coords on bifrost sampler
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 30 Apr 2020 21:20:08 +0000 (17:20 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 1 May 2020 00:27:23 +0000 (00:27 +0000)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4844>

src/gallium/drivers/panfrost/pan_cmdstream.c
src/panfrost/include/panfrost-job.h
src/panfrost/pandecode/decode.c

index 4146c8c6742be5375066dd55a6e4244c5ee6679e..f1e690c72eb8a4fc7ed3fa6e9130150abaed628e 100644 (file)
@@ -492,7 +492,6 @@ void panfrost_sampler_desc_init_bifrost(const struct pipe_sampler_state *cso,
                 .wrap_t = translate_tex_wrap(cso->wrap_t),
                 .wrap_r = translate_tex_wrap(cso->wrap_r),
                 .unk8 = 0x8,
-                .unk2 = 0x2,
                 .min_filter = cso->min_img_filter == PIPE_TEX_FILTER_NEAREST,
                 .norm_coords = cso->normalized_coords,
                 .mip_filter = cso->min_mip_filter == PIPE_TEX_MIPFILTER_LINEAR,
index 7c570829ccda80ae4a25cbc9bd3aa7dbcc5f61ab..d3a538ab53ad7f64fb52c702db4812720c325eab 100644 (file)
@@ -1352,9 +1352,10 @@ struct bifrost_sampler_descriptor {
         enum mali_wrap_mode wrap_s : 4;
         uint8_t unk8 : 4;
 
-        uint8_t unk2 : 3;
-        uint8_t min_filter : 1;
+        uint8_t unk2 : 1;
         uint8_t norm_coords : 1;
+        uint8_t unk3 : 1;
+        uint8_t min_filter : 1;
         uint8_t zero1 : 1;
         uint8_t mag_filter : 1;
         uint8_t mip_filter : 1;
index cc48b9d133fc0d8da66f4abc947cab79da284311..eff8b47aa39c71826a2adaf0535bb80ff2e95fdf 100644 (file)
@@ -2427,11 +2427,8 @@ pandecode_samplers(mali_ptr samplers, unsigned sampler_count, int job_no, bool i
                                 pandecode_prop("unk8 = 0x%x", s->unk8);
                         }
 
-                        if (s->unk2 != 2) {
-                                pandecode_msg("XXX: unk2 tripped\n");
-                                pandecode_prop("unk2 = 0x%x", s->unk2);
-                        }
-
+                        pandecode_prop("unk2 = 0x%x", s->unk2);
+                        pandecode_prop("unk3 = 0x%x", s->unk3);
                         pandecode_prop("min_filter = %s", s->min_filter ? "nearest" : "linear");
                         pandecode_prop("norm_coords = 0x%x", s->norm_coords & 0x1);
                         pandecode_prop("zero1 = 0x%x", s->zero1 & 0x1);