panfrost: Drop point sprite from shader key
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 26 Aug 2020 15:23:52 +0000 (11:23 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 28 Aug 2020 14:53:53 +0000 (14:53 +0000)
It's not implemented on Bifrost, and not needed on Midgard. For Bifrost
this will belong in mesa/st anyway.

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

src/gallium/drivers/panfrost/pan_context.c
src/gallium/drivers/panfrost/pan_context.h

index c845bfa68cac6dce20f87d2e88268192149511f5..e6ebfdb0191effd4720df7be11bc21f0145b1bb1 100644 (file)
@@ -458,18 +458,7 @@ panfrost_bind_rasterizer_state(
         void *hwcso)
 {
         struct panfrost_context *ctx = pan_context(pctx);
-
         ctx->rasterizer = hwcso;
-
-        if (!hwcso)
-                return;
-
-        /* Point sprites are emulated */
-
-        struct panfrost_shader_state *variant = panfrost_get_shader_state(ctx, PIPE_SHADER_FRAGMENT);
-
-        if (ctx->rasterizer->base.sprite_coord_enable || (variant && variant->point_sprite_mask))
-                ctx->base.bind_fs_state(&ctx->base, ctx->shader[PIPE_SHADER_FRAGMENT]);
 }
 
 static void *
@@ -619,9 +608,6 @@ panfrost_variant_matches(
         enum pipe_shader_type type)
 {
         struct panfrost_device *dev = pan_device(ctx->base.screen);
-        struct pipe_rasterizer_state *rasterizer = &ctx->rasterizer->base;
-
-        bool is_fragment = (type == PIPE_SHADER_FRAGMENT);
 
         if (variant->outputs_read) {
                 struct pipe_framebuffer_state *fb = &ctx->pipe_framebuffer;
@@ -644,23 +630,6 @@ panfrost_variant_matches(
                 }
         }
 
-        /* Point sprites TODO on bifrost, always pass */
-        if (is_fragment && rasterizer && (rasterizer->sprite_coord_enable |
-                                          variant->point_sprite_mask)
-                        && !(dev->quirks & IS_BIFROST)) {
-                /* Ensure the same varyings are turned to point sprites */
-                if (rasterizer->sprite_coord_enable != variant->point_sprite_mask)
-                        return false;
-
-                /* Ensure the orientation is correct */
-                bool upper_left =
-                        rasterizer->sprite_coord_mode ==
-                        PIPE_SPRITE_COORD_UPPER_LEFT;
-
-                if (variant->point_sprite_upper_left != upper_left)
-                        return false;
-        }
-
         /* Otherwise, we're good to go */
         return true;
 }
@@ -770,14 +739,6 @@ panfrost_bind_shader_state(
 
                                 v->rt_formats[i] = fmt;
                         }
-
-                        /* Point sprites are TODO on Bifrost */
-                        if (ctx->rasterizer && !(dev->quirks & IS_BIFROST)) {
-                                v->point_sprite_mask = ctx->rasterizer->base.sprite_coord_enable;
-                                v->point_sprite_upper_left =
-                                        ctx->rasterizer->base.sprite_coord_mode ==
-                                        PIPE_SPRITE_COORD_UPPER_LEFT;
-                        }
                 }
         }
 
index eb28e552db033864b3b8f0f83c8c11b15d06ceb6..b7cec61aa684b1698b094e0c835a2a24a294a168 100644 (file)
@@ -232,9 +232,6 @@ struct panfrost_shader_state {
         unsigned sysval_count;
         unsigned sysval[MAX_SYSVAL_COUNT];
 
-        uint16_t point_sprite_mask;
-        unsigned point_sprite_upper_left : 1;
-
         /* Should we enable helper invocations */
         bool helper_invocations;