mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 17:58:26 +02:00
compiler/types: fix serialization of cooperative matrix
Encoding of cmat_desc is overwriting the base_type with the type of the elements of the matrix. Fixes:2d0f4f2c17("compiler/types: Add support for Cooperative Matrix types") Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28086> (cherry picked from commite1b66f9707)
This commit is contained in:
parent
9e5f6d42d1
commit
2eb71d157c
2 changed files with 7 additions and 1 deletions
|
|
@ -1744,7 +1744,7 @@
|
|||
"description": "compiler/types: fix serialization of cooperative matrix",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "2d0f4f2c17b79830e9780a68bc473718d4abd4ad",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -3145,6 +3145,11 @@ encode_type_to_blob(struct blob *blob, const glsl_type *type)
|
|||
encode_type_to_blob(blob, type->fields.array);
|
||||
return;
|
||||
case GLSL_TYPE_COOPERATIVE_MATRIX:
|
||||
/* The first 5 bits of encoded/decoded are used to identify the
|
||||
* actual type, but cmat_desc already is 32-bit without that tag, so
|
||||
* encode just the cmat base type first, then the actual cmat desc.
|
||||
*/
|
||||
blob_write_uint32(blob, encoded.u32);
|
||||
encoded.cmat_desc = type->cmat_desc;
|
||||
blob_write_uint32(blob, encoded.u32);
|
||||
return;
|
||||
|
|
@ -3255,6 +3260,7 @@ decode_type_from_blob(struct blob_reader *blob)
|
|||
explicit_stride);
|
||||
}
|
||||
case GLSL_TYPE_COOPERATIVE_MATRIX: {
|
||||
encoded.u32 = blob_read_uint32(blob);
|
||||
return glsl_cmat_type(&encoded.cmat_desc);
|
||||
}
|
||||
case GLSL_TYPE_STRUCT:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue