The .spv file comes from the attached .frag file, via glslangValidator.
The .frag file exhibits and out-of-bounds access: v is a vec4, and v[i] attempts to index v at 4.
I am unsure what the semantics of out-of-bounds accesses are in SPIR-V, but I note that an OpAccessChain, rather than an OpInBoundsAccessChain, is used; I would assume that the existence of OpInBoundsAccessChain means that OpAccessChain is supposed to account for the out-of-bounds case.
This archive contains the files required to reproduce the problem.
To reproduce, do:
I get:
The .spv file comes from the attached .frag file, via glslangValidator.
The .frag file exhibits and out-of-bounds access: v is a vec4, and v[i] attempts to index v at 4.
I am unsure what the semantics of out-of-bounds accesses are in SPIR-V, but I note that an OpAccessChain, rather than an OpInBoundsAccessChain, is used; I would assume that the existence of OpInBoundsAccessChain means that OpAccessChain is supposed to account for the out-of-bounds case.
Found via https://github.com/google/graphicsfuzz.