glsl_type: Add packed to structure type comparison for hash map
authorJesse Natalie <jenatali@microsoft.com>
Thu, 17 Sep 2020 22:07:53 +0000 (15:07 -0700)
committerMarge Bot <eric+marge@anholt.net>
Fri, 18 Sep 2020 19:33:00 +0000 (19:33 +0000)
Fixes: 659f333b3a4ff "glsl: add packed for struct types"
Reviewed-by: Marek Ol\9aák <marek.olsak@amd.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6767>

src/compiler/glsl_types.cpp

index 2a77b07..e160a47 100644 (file)
@@ -1143,6 +1143,9 @@ glsl_type::record_compare(const glsl_type *b, bool match_name,
    if (this->explicit_alignment != b->explicit_alignment)
       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