Execution Tests: Update datasets for rhs values for shift operations#8179
Execution Tests: Update datasets for rhs values for shift operations#8179alsepkow merged 2 commits intomicrosoft:mainfrom
Conversation
tex3d
left a comment
There was a problem hiding this comment.
Technically, it's defined in HLSL to shift by larger values because it masks the shift value to the lower bits (5 bits for 32-bit shift), effectively making it wrap. It does seem like the test's reference computation should be modified to match the specified HLSL behavior in this way. Testing out-of-range values may seem like it's technically unnecessary for testing HW implementation since the mask is generated explicitly by the compiler, however this is a pattern we expect some drivers to match and remove the explicit masking if the GPU instruction is only expected to use the lower bits anyway, so it would still be good to make sure it is behaving as expected with larger values.
|
Yep, +1 to Tex's feedback, my suggestion wasn't to remove the out-of-range values, just to make the CPU-side validation not violate the C++ spec. |
…icrosoft#8179) Assisted by gh copilot. Fix BitShiftRhs test input sets to avoid shift amounts >= bit width, which is undefined behavior in C++ and can cause test failures as expected values are computed via C++.
Assisted by gh copilot.
Fix BitShiftRhs test input sets to avoid shift amounts >= bit width, which is undefined behavior in C++ and can cause test failures as expected values are computed via C++.