From fd92dc6b17b8e796928942a4dc96d1b9ad054358 Mon Sep 17 00:00:00 2001 From: Icecream95 Date: Thu, 14 May 2020 15:54:09 +1200 Subject: [PATCH] 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: --- src/gallium/drivers/panfrost/pan_cmdstream.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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 -- 2.30.2