Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mwyrzykowski opened this issue Jul 11, 2024 · 4 comments

Comments

@mwyrzykowski
Copy link

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.

@kainino0x
Copy link
Collaborator

@zoddicus

@zoddicus
Copy link
Contributor

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).

@mwyrzykowski
Copy link
Author

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?

@zoddicus
Copy link
Contributor

sgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants