summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Natalie <jenatali@microsoft.com>2020-09-17 15:07:53 -0700
committerDylan Baker <dylan.c.baker@intel.com>2020-09-24 09:32:14 -0700
commit6ca0035ffca254d169de4cea810723602aa87f1f (patch)
treeaaa4dc513477906f2877773a517a26d8d70a6207
parent2ca018d0ddaa0ebdf58ec903b282beaeb459f66a (diff)
glsl_type: Add packed to structure type comparison for hash map
Fixes: 659f333b3a4ff "glsl: add packed for struct types" Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6767> (cherry picked from commit 9aa86eb61aa64411b4c16d359467312f0f2729a0)
-rw-r--r--.pick_status.json2
-rw-r--r--src/compiler/glsl_types.cpp4
2 files changed, 5 insertions, 1 deletions
diff --git a/.pick_status.json b/.pick_status.json
index cf62173a0d5..bfd47886888 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1111,7 +1111,7 @@
"description": "glsl_type: Add packed to structure type comparison for hash map",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": "659f333b3a4ff92ff985b168728ad37fe3d7e437"
},
diff --git a/src/compiler/glsl_types.cpp b/src/compiler/glsl_types.cpp
index d6315845e68..87a652d7ed2 100644
--- a/src/compiler/glsl_types.cpp
+++ b/src/compiler/glsl_types.cpp
@@ -1109,6 +1109,10 @@ glsl_type::record_compare(const glsl_type *b, bool match_name,
if (this->interface_row_major != b->interface_row_major)
return false;
+
+ if (this->packed != b->packed)
+ return false;
+
/* From the GLSL 4.20 specification (Sec 4.2):
*
* "Structures must have the same name, sequence of type names, and