Mesa (master): panfrost: Fix norm coords on bifrost sampler

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri May 1 00:49:38 UTC 2020


Module: Mesa
Branch: master
Commit: bbecbedb4cae6ea646a2a387378daa086b0a9bde
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bbecbedb4cae6ea646a2a387378daa086b0a9bde

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Thu Apr 30 17:20:08 2020 -0400

panfrost: Fix norm coords on bifrost sampler

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4844>

---

 src/gallium/drivers/panfrost/pan_cmdstream.c | 1 -
 src/panfrost/include/panfrost-job.h          | 5 +++--
 src/panfrost/pandecode/decode.c              | 7 ++-----
 3 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c
index 4146c8c6742..f1e690c72eb 100644
--- a/src/gallium/drivers/panfrost/pan_cmdstream.c
+++ b/src/gallium/drivers/panfrost/pan_cmdstream.c
@@ -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,
diff --git a/src/panfrost/include/panfrost-job.h b/src/panfrost/include/panfrost-job.h
index 7c570829ccd..d3a538ab53a 100644
--- a/src/panfrost/include/panfrost-job.h
+++ b/src/panfrost/include/panfrost-job.h
@@ -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;
diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c
index cc48b9d133f..eff8b47aa39 100644
--- a/src/panfrost/pandecode/decode.c
+++ b/src/panfrost/pandecode/decode.c
@@ -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);



More information about the mesa-commit mailing list