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

Fix bgra8unorm storage handling #4046

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wailin247
Copy link

@wailin247 wailin247 commented Nov 19, 2024

Related to #3847


For more details, open the Copilot Workspace session.

@@ -580,7 +580,7 @@ g.test('basic')
t.selectDeviceOrSkipTestCase('bgra8unorm-storage');
}
if (t.isCompatibility) {
t.skipIfTextureFormatNotUsableAsStorageTexture(t.params.format);
t.skipIfTextureFormatNotUsableAsStorageTexture(t.params.format, t.device);
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is not possible because no device has been selected yet.
npm run typecheck will catch this and other issues. I also strongly recommend using VSCode or otherwise having working TypeScript integration so you will see this in your IDE/editor.

Please run the full tests npm test and ensure the test is running as expected in a real browser before sending for review (you can open the PR as a "draft" if needed). In this case npm start to start a server and then open http://localhost:8080/standalone/?compatibility=1&q=webgpu:api,operation,storage_texture,read_only:basic:format=%22bgra8unorm%22;* because you need to test with compatibility=1.

There's no really good general solution to this right now (#3848), but since there is already special logic here to check for bgra8unorm-storage, I think you can simply skip this check when the format is bgra8unorm.

Copy link
Contributor

Choose a reason for hiding this comment

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

I get that the PR is incorrect but it's also not clear what problem it's trying to solve with regards to #3847. The code at line 580 should have already skipped the test if bgra8unorm-storage is not supported.

Copy link
Collaborator

Choose a reason for hiding this comment

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

IIUC the problem is the opposite: if the format is bgra8unorm, then we enable bgra8unorm-storage... but then skipIfTextureFormatNotUsableAsStorageTexture skips the test anyway, because the capability tables say it won't work.

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.

3 participants