spirv: Only require bare types to match when copying variables
authorDanylo Piliaiev <danylo.piliaiev@globallogic.com>
Mon, 17 Aug 2020 09:02:22 +0000 (12:02 +0300)
committerMarge Bot <eric+marge@anholt.net>
Tue, 18 Aug 2020 11:53:07 +0000 (11:53 +0000)
OpCopyMemory doesn't care about mismatched decorations, only about
matching types.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3418
Fixes: bf1a1eed882980a1cd08482386e3a001ce64a5a4
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6344>

src/compiler/spirv/vtn_variables.c

index 5f09857a9c8e695cc6d1bbf546a4c5e9907a768b..47932f0cd16c6fd6a24d1b720bc795e08ef95ed7 100644 (file)
@@ -1155,7 +1155,8 @@ static void
 _vtn_variable_copy(struct vtn_builder *b, struct vtn_pointer *dest,
                    struct vtn_pointer *src)
 {
-   vtn_assert(src->type->type == dest->type->type);
+   vtn_assert(glsl_get_bare_type(src->type->type) ==
+              glsl_get_bare_type(dest->type->type));
    enum glsl_base_type base_type = glsl_get_base_type(src->type->type);
    switch (base_type) {
    case GLSL_TYPE_UINT: