From: Icecream95 Date: Thu, 14 May 2020 03:54:09 +0000 (+1200) Subject: panfrost: Clean up panfrost_frag_meta_rasterizer_update X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fd92dc6b17b8e796928942a4dc96d1b9ad054358;p=mesa.git panfrost: Clean up panfrost_frag_meta_rasterizer_update Create a pointer to ctx->rasterizer->base so it isn't repeatedly referred to. Reviewed-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index 2691193738c..aa82d0ca339 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -553,20 +553,20 @@ panfrost_frag_meta_rasterizer_update(struct panfrost_context *ctx, return; } - bool msaa = ctx->rasterizer->base.multisample; + struct pipe_rasterizer_state *rast = &ctx->rasterizer->base; + + bool msaa = rast->multisample; /* TODO: Sample size */ SET_BIT(fragmeta->unknown2_3, MALI_HAS_MSAA, msaa); SET_BIT(fragmeta->unknown2_4, MALI_NO_MSAA, !msaa); - fragmeta->depth_units = ctx->rasterizer->base.offset_units * 2.0f; - fragmeta->depth_factor = ctx->rasterizer->base.offset_scale; + fragmeta->depth_units = rast->offset_units * 2.0f; + fragmeta->depth_factor = rast->offset_scale; /* XXX: Which bit is which? Does this maybe allow offseting not-tri? */ - SET_BIT(fragmeta->unknown2_4, MALI_DEPTH_RANGE_A, - ctx->rasterizer->base.offset_tri); - SET_BIT(fragmeta->unknown2_4, MALI_DEPTH_RANGE_B, - ctx->rasterizer->base.offset_tri); + SET_BIT(fragmeta->unknown2_4, MALI_DEPTH_RANGE_A, rast->offset_tri); + SET_BIT(fragmeta->unknown2_4, MALI_DEPTH_RANGE_B, rast->offset_tri); } static void