spirv-execution-env
spirv-execution-env copied to clipboard
require clamping of index for OpVectorExtractDyanmic, OpVectorInsertDynamic, and bitfield insert and extract
This eliminates a source of undefined behaviour.
Maybe I misunderstand the title, shouldn't this be handled by implementations as a code transform instead? I'm not sure how easy it is to spec that the application has to do it.
Yes, the implementation has to ensure that these instructions behave as if clamped. The shader coming into the implementation doesn't have to do anything special to get this behaviour.