spirv-execution-env icon indicating copy to clipboard operation
spirv-execution-env copied to clipboard

require clamping of index for OpVectorExtractDyanmic, OpVectorInsertDynamic, and bitfield insert and extract

Open dneto0 opened this issue 6 years ago • 2 comments

This eliminates a source of undefined behaviour.

dneto0 avatar May 10 '19 18:05 dneto0

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.

Kangz avatar May 10 '19 21:05 Kangz

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.

dneto0 avatar Jun 22 '19 00:06 dneto0