Skip to content

Conversation

SenorBlanco
Copy link
Collaborator

Enable WebGPU Compatibility Mode for all samples that can run unmodified in that mode.

Enable WebGPU Compatibility Mode for all samples that can run
unmodified in that mode.
@SenorBlanco SenorBlanco requested a review from kainino0x March 12, 2025 17:39
Copy link
Collaborator

@kainino0x kainino0x left a comment

Choose a reason for hiding this comment

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

LGTM, but if we're waiting for Chrome 134, we should wait a bit longer because it doesn't ship on ChromeOS until next week. (https://chromiumdash.appspot.com/schedule)

@greggman
Copy link
Collaborator

Committing now shouldn't break anything right? featureLevel will just be ignored.

Copy link
Collaborator

@kainino0x kainino0x left a comment

Choose a reason for hiding this comment

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

There was an issue where the initial implementation, with WebGPUFeatureLevel enabled or --enable-unsafe-webgpu, would error if featureLevel was set to anything at all. I wasn't sure what Chrome version this was, however looking at the code history it looks like it was fixed starting with 133, so actually we should be fine. (Stephen please verify that 133 is the correct release.)

@SenorBlanco
Copy link
Collaborator Author

IIRC, it was fixed here: https://crrev.com/1392500.

I actually thought that went into M134, but according to this, it went into M133:

https://chromiumdash.appspot.com/commit/d00996faacd9c096f6c53617204b6ee5eee435c4

So we should be easily good to go now.

@kainino0x
Copy link
Collaborator

great!

@kainino0x kainino0x merged commit 28f6904 into webgpu:main Mar 13, 2025
1 check passed
@shrekshao
Copy link
Collaborator

I think with the new "core-features-and-limits" spec update, this pattern will create a compat device? (without requiring "core-features-and-limits", compat defaulting adapter will create compat device)

"core-features-and-limits" is landed in M136 so we will need to update the samples by then.

Update will likely be:

const adapter = await navigator.gpu?.requestAdapter({
  featureLevel: 'compatibility',
});
const device = await adapter?.requestDevice(adapter?.features.has('core-features-and-limits') ? {requiredFeatures: ['core-features-and-limits']} : {});

@greggman
Copy link
Collaborator

It's okay to create a compat device as that's all the sample needs to run.

@SenorBlanco SenorBlanco deleted the enable-compat-easy branch March 21, 2025 20:04
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.

4 participants