vtn: Support cooperative matrices in OpConstantNull

Cooperative matrix initializers are a single scalar value that gets
broadcasted to the entire matrix.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12679
Fixes: b98f87612b ("spirv: Implement SPV_KHR_cooperative_matrix")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33747>
This commit is contained in:
Faith Ekstrand 2025-02-25 18:38:26 -06:00 committed by Marge Bot
parent 0e7c94b2b3
commit 7c47a3d0f7

View file

@ -2256,6 +2256,7 @@ vtn_null_constant(struct vtn_builder *b, struct vtn_type *type)
switch (type->base_type) {
case vtn_base_type_scalar:
case vtn_base_type_vector:
case vtn_base_type_cooperative_matrix:
c->is_null_constant = true;
/* Nothing to do here. It's already initialized to zero */
break;