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

Test fixes for alignment validation landing #4016

Merged

Conversation

petermcneeleychromium
Copy link
Contributor

Issue:
crbug.com/375467276

Change (correct validation) that introduced this issue
https://dawn-review.googlesource.com/c/dawn/+/212315

@petermcneeleychromium
Copy link
Contributor Author

You mentioned this being part of a spec discussion for the align(1)

Copy link
Contributor

@dneto0 dneto0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

pass: false,
// EXCEPTION: Error: Unexpected validation error occurred:
// Error while parsing WGSL: :6:10 error: alignment must be a
// multiple of '4' bytes for the 'uniform' address space @align(1) a: i32,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this LGTM.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops, no this is wrong.

The real check is whether the offset if incorrect.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on our discussion it sounds like this change is correct.
Shall i remove the extraneous comment in the source

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, after a bunch of discussion, we agreed to change Tint to be more in line with Naga and WebKit.

crbug.com/379760170 is the Tint change.

But also clarify the spec: gpuweb/gpuweb#4978

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Given the proposed spec change, additional tests will be needed. For followup.

@petermcneeleychromium
Copy link
Contributor Author

Some of these tests only consider the case of storage and uniform and not workgroup
.combine('address_space', ['storage', 'uniform'])

pass: false,
// EXCEPTION: Error: Unexpected validation error occurred:
// Error while parsing WGSL: :6:10 error: alignment must be a
// multiple of '4' bytes for the 'uniform' address space @align(1) a: i32,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Given the proposed spec change, additional tests will be needed. For followup.

@petermcneeleychromium petermcneeleychromium merged commit 467c899 into gpuweb:main Nov 19, 2024
1 check passed
@petermcneeleychromium petermcneeleychromium deleted the alignment_issue_matrix branch November 19, 2024 04:28
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

Successfully merging this pull request may close these issues.

2 participants