From: Alyssa Rosenzweig Date: Thu, 20 Aug 2020 23:31:00 +0000 (-0400) Subject: panfrost: Group SFBD code tighter X-Git-Url: https://git.libre-soc.org/?p=mesa.git;a=commitdiff_plain;h=1574866233ad20958f96c76feec18346642ca9ab;hp=518537d1c8c8958db97bc08bf28182cc9e43921b panfrost: Group SFBD code tighter Allows us to drop the redundant check by reordering, and will match the conventions we'll use once the whole structure is XMLified. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Tomeu Vizoso Part-of: --- diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index 4a11bc98d81..8f9771ba3bc 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -685,12 +685,6 @@ panfrost_emit_frag_shader(struct panfrost_context *ctx, fragmeta->unknown2_3 |= MALI_DEPTH_FUNC(panfrost_translate_compare_func( zsa->base.depth.enabled ? zsa->base.depth.func : PIPE_FUNC_ALWAYS)); - SET_BIT(fragmeta->unknown2_4, MALI_NO_DITHER, - (dev->quirks & MIDGARD_SFBD) && - !ctx->blend->base.dither); - - SET_BIT(fragmeta->unknown2_4, 0x10, dev->quirks & MIDGARD_SFBD); - SET_BIT(fragmeta->unknown2_4, MALI_ALPHA_TO_COVERAGE, ctx->blend->base.alpha_to_coverage); @@ -734,6 +728,9 @@ panfrost_emit_frag_shader(struct panfrost_context *ctx, SET_BIT(fragmeta->unknown2_3, MALI_CAN_DISCARD, blend[0].load_dest); + + fragmeta->unknown2_4 |= 0x10; + SET_BIT(fragmeta->unknown2_4, MALI_NO_DITHER, !ctx->blend->base.dither); } else if (!(dev->quirks & IS_BIFROST)) { /* Bug where MRT-capable hw apparently reads the last blend * shader from here instead of the usual location? */