commit | 6d13c992738c67445c90c659491583c56307c10b | [log] [tgz] |
---|---|---|
author | Hans-Kristian Arntzen <post@arntzen-software.no> | Wed Oct 20 22:24:18 2021 +0200 |
committer | GitHub <noreply@github.com> | Wed Oct 20 22:24:18 2021 +0200 |
tree | b5903d565fffecd80f6a2a03276a291fd8abc521 | |
parent | e4243b898ca5e1e19e48725a991ada1e5744691c [diff] | |
parent | 595eb0c21dc95a27cd7b4626f696f44dfe9c1664 [diff] |
Merge pull request #1780 from billhollings/out-of-bounds-swizzle-fix Per spec, support undefined behavior for out-of-bounds swizzles.
diff --git a/spirv_glsl.cpp b/spirv_glsl.cpp index ccab208..21d5439 100644 --- a/spirv_glsl.cpp +++ b/spirv_glsl.cpp
@@ -8525,7 +8525,7 @@ case 3: return "w"; default: - SPIRV_CROSS_THROW("Swizzle index out of range"); + return "x"; // Don't crash, but engage the "undefined behavior" described for out-of-bounds logical addressing in spec. } }