Merge pull request #1780 from billhollings/out-of-bounds-swizzle-fix
Per spec, support undefined behavior for out-of-bounds swizzles.
This commit is contained in:
commit
6d13c99273
@ -8525,7 +8525,7 @@ const char *CompilerGLSL::index_to_swizzle(uint32_t index)
|
||||
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.
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user