panfrost: Support (non-)seamless cube maps
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 24 Jun 2019 16:16:11 +0000 (09:16 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 25 Jun 2019 20:39:17 +0000 (13:39 -0700)
Identify the seamless cubemap bit and passthrough the Gallium state
rather than setting unconditionally.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/include/panfrost-job.h
src/gallium/drivers/panfrost/pan_context.c
src/gallium/drivers/panfrost/pandecode/decode.c

index fbef4efdc322fcc59b72ddc56d2f4a1d1d2dae62..684b3f598bdf01a600853cd7e4c6e4f7b423e0a6 100644 (file)
@@ -1234,8 +1234,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;
 
index fcf5e730c2befb14f582313a833c211a27fbd788..97863504d4bffb1b1dc6e67f11d01d9608396516 100644 (file)
@@ -1873,7 +1873,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
index 8c5d77f66fda53177c231ccd4c99105c3652e4f1..7f58ad033669e488e4a166d5e5e1d554a7425f8a 100644 (file)
@@ -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],