mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
panfrost: Fix is_opaque prototype
Fixes:93824b6451("panfrost: Move the blend logic out of the gallium driver") Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10869> (cherry picked from commitc35194b945)
This commit is contained in:
parent
fd3dc85507
commit
f60f062d80
4 changed files with 17 additions and 20 deletions
|
|
@ -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"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue