gpuweb / spirv-execution-env

SPIR-V for WebGPU documents (execution environment and more!)
16 stars 8 forks source link

Enumerate sources of undefined and indeterminate behaviour #2

Open dneto0 opened 6 years ago

dneto0 commented 6 years ago

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.

dneto0 commented 6 years ago

It's also worth taking a second closer look, in case we missed something the first time around.

dneto0 commented 6 years ago

After #3 was merged, the following items from https://github.com/gpuweb/gpuweb/issues/34 remain to be addressed in spirv-execution-env.md:

dneto0 commented 6 years ago

The old issue explicitly did not deal with floating point exceptional cases. But the environment spec should bound the behaviours.

RobinMorisset commented 5 years ago

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.