From e41d847e025e6e9e8ca45ae8d0c582c4860d53f2 Mon Sep 17 00:00:00 2001 From: luboslenco Date: Tue, 18 Aug 2020 16:33:16 +0200 Subject: [PATCH] Fix ArrayStride decoration for SPIRV --- Sources/SpirVTranslator.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Sources/SpirVTranslator.cpp b/Sources/SpirVTranslator.cpp index 5ea290b..806ae8f 100644 --- a/Sources/SpirVTranslator.cpp +++ b/Sources/SpirVTranslator.cpp @@ -217,9 +217,8 @@ namespace { newinstructions.push_back(dec3); } else if (utype == floatarraytype || utype == vec2arraytype || utype == vec3arraytype || utype == vec4arraytype) { - Instruction dec3(OpDecorate, &instructionsData[instructionsDataIndex], 4); + Instruction dec3(OpDecorate, &instructionsData[instructionsDataIndex], 3); structtypeindices.push_back(instructionsDataIndex); - instructionsData[instructionsDataIndex++] = 0; instructionsData[instructionsDataIndex++] = utype; instructionsData[instructionsDataIndex++] = DecorationArrayStride; instructionsData[instructionsDataIndex++] = 16;