Skip to content

Commit cf98a5c

Browse files
committed
Make SPIR-V compute shader image types work better
1 parent 8db42c5 commit cf98a5c

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Sources/SpirVTranslator.cpp

+1-6
Original file line numberDiff line numberDiff line change
@@ -860,12 +860,7 @@ void SpirVTranslator::outputCode(const Target& target, const char* sourcefilenam
860860
}
861861
else if (inst.opcode == OpTypeImage) {
862862
Instruction copy = inst;
863-
if (stage == StageCompute) {
864-
copy.length -= 1;
865-
}
866-
else {
867-
copy.length -= 2;
868-
}
863+
copy.length -= 2; // cut the video flag and the access flag
869864
newinstructions.push_back(copy);
870865
}
871866
else if (inst.opcode == OpVariable) {

0 commit comments

Comments
 (0)