From cf98a5ca80c2c8144824da35480769d718f10486 Mon Sep 17 00:00:00 2001 From: Robert Konrad Date: Wed, 24 Jan 2024 15:54:27 +0100 Subject: [PATCH] Make SPIR-V compute shader image types work better --- Sources/SpirVTranslator.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Sources/SpirVTranslator.cpp b/Sources/SpirVTranslator.cpp index 35363ec..ac1f669 100644 --- a/Sources/SpirVTranslator.cpp +++ b/Sources/SpirVTranslator.cpp @@ -860,12 +860,7 @@ void SpirVTranslator::outputCode(const Target& target, const char* sourcefilenam } else if (inst.opcode == OpTypeImage) { Instruction copy = inst; - if (stage == StageCompute) { - copy.length -= 1; - } - else { - copy.length -= 2; - } + copy.length -= 2; // cut the video flag and the access flag newinstructions.push_back(copy); } else if (inst.opcode == OpVariable) {