diff --git a/.pick_status.json b/.pick_status.json index f35aa0d5c01..045fa6a87eb 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2308,7 +2308,7 @@ "description": "panfrost: Fix is_opaque prototype", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "93824b6451a4cc3eece1d7afa77e9a440ee41ee3" }, diff --git a/src/gallium/drivers/panfrost/pan_blend_cso.c b/src/gallium/drivers/panfrost/pan_blend_cso.c index 5a2044d00ce..157c2349128 100644 --- a/src/gallium/drivers/panfrost/pan_blend_cso.c +++ b/src/gallium/drivers/panfrost/pan_blend_cso.c @@ -156,7 +156,7 @@ panfrost_get_blend_for_context(struct panfrost_context *ctx, unsigned rti, struc struct panfrost_blend_final final = { .load_dest = pan_blend_reads_dest(pan_blend.rts[rti].equation), .equation.constant = pan_blend_get_constant(dev, &pan_blend, rti), - .opaque = pan_blend_is_opaque(&pan_blend, rti), + .opaque = pan_blend_is_opaque(pan_blend.rts[rti].equation), .no_colour = pan_blend.rts[rti].equation.color_mask == 0, }; diff --git a/src/panfrost/lib/pan_blend.c b/src/panfrost/lib/pan_blend.c index 13b5ce5e0f5..ecb7457263c 100644 --- a/src/panfrost/lib/pan_blend.c +++ b/src/panfrost/lib/pan_blend.c @@ -277,23 +277,21 @@ to_panfrost_function(enum blend_func blend_func, } bool -pan_blend_is_opaque(const struct pan_blend_state *state, unsigned rt) +pan_blend_is_opaque(const struct pan_blend_equation equation) { - const struct pan_blend_equation *equation = &state->rts[rt].equation; - - return equation->rgb_src_factor == BLEND_FACTOR_ZERO && - equation->rgb_invert_src_factor && - equation->rgb_dst_factor == BLEND_FACTOR_ZERO && - !equation->rgb_invert_dst_factor && - (equation->rgb_func == BLEND_FUNC_ADD || - equation->rgb_func == BLEND_FUNC_SUBTRACT) && - equation->alpha_src_factor == BLEND_FACTOR_ZERO && - equation->alpha_invert_src_factor && - equation->alpha_dst_factor == BLEND_FACTOR_ZERO && - !equation->alpha_invert_dst_factor && - (equation->alpha_func == BLEND_FUNC_ADD || - equation->alpha_func == BLEND_FUNC_SUBTRACT) && - equation->color_mask == 0xf; + return equation.rgb_src_factor == BLEND_FACTOR_ZERO && + equation.rgb_invert_src_factor && + equation.rgb_dst_factor == BLEND_FACTOR_ZERO && + !equation.rgb_invert_dst_factor && + (equation.rgb_func == BLEND_FUNC_ADD || + equation.rgb_func == BLEND_FUNC_SUBTRACT) && + equation.alpha_src_factor == BLEND_FACTOR_ZERO && + equation.alpha_invert_src_factor && + equation.alpha_dst_factor == BLEND_FACTOR_ZERO && + !equation.alpha_invert_dst_factor && + (equation.alpha_func == BLEND_FUNC_ADD || + equation.alpha_func == BLEND_FUNC_SUBTRACT) && + equation.color_mask == 0xf; } static bool diff --git a/src/panfrost/lib/pan_blend.h b/src/panfrost/lib/pan_blend.h index 78a209b0640..e25f5b05474 100644 --- a/src/panfrost/lib/pan_blend.h +++ b/src/panfrost/lib/pan_blend.h @@ -104,8 +104,7 @@ pan_blend_can_fixed_function(const struct panfrost_device *dev, unsigned rt); bool -pan_blend_is_opaque(const struct pan_blend_state *state, - unsigned rt); +pan_blend_is_opaque(const struct pan_blend_equation eq); unsigned pan_blend_constant_mask(const struct pan_blend_state *state,