gpuweb/cts

bitwise_shift tests appear to be non-conformant, fails on Chrome and Safari Technology Preview

Opened this issue · 4 comments

The following test:
https://gpuweb.github.io/cts/standalone/?q=webgpu:shader,execution,expression,binary,bitwise_shift:shift_right_abstract:*

fails on Chrome Version 126.0.6478.127 (Official Build) (arm64)

One such failure:

EXPECTATION FAILED: (-9223372036854775808 (0x8000000000000000), 64 (0x00000040))
    returned: 0 (0x0000000000000000)
    expected: -1 (0xffffffffffffffff)

On Safari Technology Preview 198, the test doesn't complete because submitBatch doesn't handle a promise rejection:

const checkBatch = await submitBatch(t, shaderBuilder, shaderBuilderParams, pipelineCache);

Safari rejects the promise because shader compilation fails. The shader compilation fails apparently due to
Screenshot 2024-07-11 at 2 03 21 PM

because the test attempts to perform a right shift operation greater than the number of bits in a 64 bit integer, which we reject.

I think the test is correct here, since this is an abstract case there is not limit on how many bits can be right shifted, https://www.w3.org/TR/WGSL/#bit-expr. (concrete and abstract right-shift have different defintions).

Thanks for clarifying @zoddicus that makes sense. I suppose the only issue is failing compilation results in the test not recovering, so perhaps minor suggestion to handle the promise rejection. I am also happy to make a PR for this if you have no objections?

sgtm