mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 10:18:05 +02:00
panfrost: Assert that blend shaders are nontrivial
Even if the driver doesn't *use* trivial blend shaders, building and compiling blend shaders is expensive. We shouldn't be building blend shaders that should never be used. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17841>
This commit is contained in:
parent
1d5aad9db4
commit
fcae7cfd27
1 changed files with 4 additions and 0 deletions
|
|
@ -799,6 +799,10 @@ GENX(pan_blend_get_shader_locked)(const struct panfrost_device *dev,
|
|||
.equation = state->rts[rt].equation,
|
||||
};
|
||||
|
||||
/* Blend shaders should only be used for blending on Bifrost onwards */
|
||||
assert(dev->arch <= 5 || !pan_blend_is_opaque(state->rts[rt].equation));
|
||||
assert(state->rts[rt].equation.color_mask != 0);
|
||||
|
||||
struct hash_entry *he = _mesa_hash_table_search(dev->blend_shaders.shaders, &key);
|
||||
struct pan_blend_shader *shader = he ? he->data : NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue