From: Alyssa Rosenzweig Date: Wed, 26 Aug 2020 15:23:52 +0000 (-0400) Subject: panfrost: Drop point sprite from shader key X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3bae493d1a15796ba579d97fabe26063dea70bca;p=mesa.git panfrost: Drop point sprite from shader key 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 Part-of: --- diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index c845bfa68ca..e6ebfdb0191 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -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; - } } } diff --git a/src/gallium/drivers/panfrost/pan_context.h b/src/gallium/drivers/panfrost/pan_context.h index eb28e552db0..b7cec61aa68 100644 --- a/src/gallium/drivers/panfrost/pan_context.h +++ b/src/gallium/drivers/panfrost/pan_context.h @@ -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;