[Mesa-dev] [PATCH 17/20] panfrost: Support (non-)seamless cube maps

Alyssa Rosenzweig alyssa.rosenzweig at collabora.com
Mon Jun 24 17:39:20 UTC 2019


Identify the seamless cubemap bit and passthrough the Gallium state
rather than setting unconditionally.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
---
 src/gallium/drivers/panfrost/include/panfrost-job.h | 5 +++--
 src/gallium/drivers/panfrost/pan_context.c          | 2 +-
 src/gallium/drivers/panfrost/pandecode/decode.c     | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/panfrost/include/panfrost-job.h b/src/gallium/drivers/panfrost/include/panfrost-job.h
index 6da86148cd7..f1094d76cdf 100644
--- a/src/gallium/drivers/panfrost/include/panfrost-job.h
+++ b/src/gallium/drivers/panfrost/include/panfrost-job.h
@@ -1235,8 +1235,9 @@ struct mali_sampler_descriptor {
         enum mali_wrap_mode wrap_r : 4;
         enum mali_alt_func compare_func : 3;
 
-        /* A single set bit of unknown, ha! */
-        unsigned unknown2 : 1;
+        /* No effect on 2D textures. For cubemaps, set for ES3 and clear for
+         * ES2, controlling seamless cubemapping */
+        unsigned seamless_cube_map : 1;
 
         unsigned zero : 16;
 
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index bdd1551a531..c6fe3f87890 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -1743,7 +1743,7 @@ panfrost_create_sampler_state(
                 },
                 .min_lod = FIXED_16(cso->min_lod),
                 .max_lod = FIXED_16(cso->max_lod),
-                .unknown2 = 1,
+                .seamless_cube_map = cso->seamless_cube_map,
         };
 
         /* If necessary, we disable mipmapping in the sampler descriptor by
diff --git a/src/gallium/drivers/panfrost/pandecode/decode.c b/src/gallium/drivers/panfrost/pandecode/decode.c
index 8d03618c9f0..b26cd2909e0 100644
--- a/src/gallium/drivers/panfrost/pandecode/decode.c
+++ b/src/gallium/drivers/panfrost/pandecode/decode.c
@@ -1758,7 +1758,7 @@ pandecode_replay_vertex_tiler_postfix_pre(const struct mali_vertex_tiler_postfix
                                         pandecode_prop("zero = 0x%X, 0x%X\n", s->zero, s->zero2);
                                 }
 
-                                pandecode_prop("unknown2 = %d", s->unknown2);
+                                pandecode_prop("seamless_cube_map = %d", s->seamless_cube_map);
 
                                 pandecode_prop("border_color = { %f, %f, %f, %f }",
                                              s->border_color[0],
-- 
2.20.1



More information about the mesa-dev mailing list