panvk: Check can_fixed_function() before checking constants

This will prevent us from asserting on float formats.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39171>
This commit is contained in:
Faith Ekstrand 2026-01-06 15:04:37 -05:00 committed by Marge Bot
parent 839c3a49e5
commit cd0c3b366f

View file

@ -240,6 +240,10 @@ blend_needs_shader(const struct pan_blend_state *state, unsigned rt_idx,
if (!GENX(pan_blendable_format_from_pipe_format)(rt->format)->internal)
return true;
bool supports_2src = pan_blend_supports_2src(PAN_ARCH);
if (!pan_blend_can_fixed_function(rt->equation, supports_2src))
return true;
unsigned constant_mask = pan_blend_constant_mask(rt->equation);
/* v6 doesn't support blend constants in FF blend equations. */
@ -263,10 +267,6 @@ blend_needs_shader(const struct pan_blend_state *state, unsigned rt_idx,
return true;
}
bool supports_2src = pan_blend_supports_2src(PAN_ARCH);
if (!pan_blend_can_fixed_function(rt->equation, supports_2src))
return true;
/* Update the fixed function blend constant, if we use it. */
if (blend_const != ~0)
*ff_blend_constant = blend_const;