aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-04-30 17:20:08 -0400
committerMarge Bot <[email protected]>2020-05-01 00:27:23 +0000
commitbbecbedb4cae6ea646a2a387378daa086b0a9bde (patch)
tree3afe951eaa214a01ee55a707f67f7dc53601817e
parent401409eff31ed4a47b165806a28c870f63498916 (diff)
panfrost: Fix norm coords on bifrost sampler
Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4844>
-rw-r--r--src/gallium/drivers/panfrost/pan_cmdstream.c1
-rw-r--r--src/panfrost/include/panfrost-job.h5
-rw-r--r--src/panfrost/pandecode/decode.c7
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);