Open dneto0 opened 6 years ago
It's also worth taking a second closer look, in case we missed something the first time around.
After #3 was merged, the following items from https://github.com/gpuweb/gpuweb/issues/34 remain to be addressed in spirv-execution-env.md:
The old issue explicitly did not deal with floating point exceptional cases. But the environment spec should bound the behaviours.
Out of all of these, derivatives outside of uniform control flow is the one that significantly concerns me. Are the underlying implementations actually safe and using "undefined behaviour" for mere wrong results, or can they actually access arbitrary memory in that case (for example)? I've tried to look it up in the various specifications/documentations, but with very little success.
Issue https://github.com/gpuweb/gpuweb/issues/34 was an investigation of sources of undefined and indeterminate behaviour in the SPIR-V core spec. The WebGPU environment spec for SPIR-V should call out those cases and recommend what an implementation should do about them.