]> git.tdb.fi Git - libs/gl.git/commitdiff
Fixes for handling extended alignment in GLSL
authorMikko Rasa <tdb@tdb.fi>
Sat, 27 Nov 2021 18:00:27 +0000 (20:00 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sat, 27 Nov 2021 18:06:41 +0000 (20:06 +0200)
source/glsl/spirv.cpp
source/glsl/syntax.cpp

index 07d4eb072c0989eb1745405aae0c85ea2ae59fc7..481f38fb5ae729b3a16b03725ec7c1f7dd9c71cf 100644 (file)
@@ -385,7 +385,7 @@ SpirVGenerator::Id SpirVGenerator::get_variable_type_id(const VariableDeclaratio
                        }
                        else
                                size_id = get_constant_id(get_standard_type_id(BasicTypeDeclaration::INT, 1), 1);
-                       return get_array_type_id(*basic->base_type, size_id, true);
+                       return get_array_type_id(*basic->base_type, size_id, basic->extended_alignment);
                }
 
        return get_id(*var.type_declaration);
index 45765f27d88dbf0599e9de494a5ceea90dc64dd4..d74291bc2840edd89391f6ce04e4fc04275bf5b2 100644 (file)
@@ -224,6 +224,7 @@ BasicTypeDeclaration::BasicTypeDeclaration(const BasicTypeDeclaration &other):
        kind(other.kind),
        size(other.size),
        sign(other.sign),
+       extended_alignment(other.extended_alignment),
        base(other.base)
        // Do not copy base type
 { }
@@ -247,7 +248,8 @@ StructDeclaration::StructDeclaration()
 
 StructDeclaration::StructDeclaration(const StructDeclaration &other):
        TypeDeclaration(other),
-       members(other.members)
+       members(other.members),
+       extended_alignment(other.extended_alignment)
        // Do not copy interface block
 { }