Mesa (master): compiler/types: Fix deserializing structs with >= 15 members
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Sep 4 20:25:09 UTC 2020
Module: Mesa
Branch: master
Commit: 11fbd9806dd99d7a18081ca0d09e4db977f8af1b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=11fbd9806dd99d7a18081ca0d09e4db977f8af1b
Author: Jason Ekstrand <jason at jlekstrand.net>
Date: Fri Sep 4 14:06:29 2020 -0500
compiler/types: Fix deserializing structs with >= 15 members
This was a typo in a0b82c24b6d08c where we used the wrong struct member
to decide whether or not to read the explicit_alignment.
Fixes: a0b82c24b6d08c "nir/glsl: Add an explicit_alignment field to glsl_type"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3487
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6605>
---
src/compiler/glsl_types.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/compiler/glsl_types.cpp b/src/compiler/glsl_types.cpp
index 288ddcf5dea..2a77b075c28 100644
--- a/src/compiler/glsl_types.cpp
+++ b/src/compiler/glsl_types.cpp
@@ -2858,7 +2858,7 @@ encode_type_to_blob(struct blob *blob, const glsl_type *type)
/* If we don't have enough bits for length, store it separately. */
if (encoded.strct.length == 0xfffff)
blob_write_uint32(blob, type->length);
- if (encoded.strct.length == 0xf)
+ if (encoded.strct.explicit_alignment == 0xf)
blob_write_uint32(blob, type->explicit_alignment);
for (unsigned i = 0; i < type->length; i++)
More information about the mesa-commit
mailing list