Skip to content

Conversation

beaufortfrancois
Copy link
Collaborator

This PR adds tokens for the WebGPU compatibility mode origin trial:

image

@beaufortfrancois
Copy link
Collaborator Author

FYI @SenorBlanco

@SenorBlanco
Copy link
Collaborator

Thanks for doing this!

one for http://localhost:8080/

Good idea! I didn't even know that worked.

@greggman greggman merged commit fd5fbb1 into webgpu:main Jun 24, 2025
1 check passed
@SenorBlanco
Copy link
Collaborator

SenorBlanco commented Jul 7, 2025

This doesn't seem to be working. Compatibiilty mode still seems to require enabling "WebGPU Developer Features" in chrome://flags.

@beaufortfrancois
Copy link
Collaborator Author

According to DevTools, the WebCompatibiiltyMode OT token is working. See the Chrome Canary screenshot below:
image

Note that it is not working in Chrome Stable though as the trial starts in Chrome 139. See:
image

@beaufortfrancois
Copy link
Collaborator Author

Note that I'm surprised "WebGPU Developer Features" is required for WebGPU compatibility mode as my understanding it had nothing to do with it. Did you mean "WebGPU Experimental Features"?

@SenorBlanco
Copy link
Collaborator

SenorBlanco commented Jul 8, 2025

Sorry, I should've been more clear. I tried it on Canary in three older Android devices which should be working after my blocklist change last week:

Lenovo Tab M8 Gen4 (PowerVR Rogue GE8300)
Redmi A5 (PowerVR Rogue GE8320)
Samsung Tab S4 (Qualcomm Adreno 540)

and they all failed as above.
chrome://gpu shows WebGPU: Hardware Accelerated, and the Dawn Info shows the OpenGLES driver with [WebGPU Status] Available.

It actually does start working with "WebGPU Developer Features" enabled (this was a mistake, I meant to enable Experimental features), but this is an interesting datapoint. I can't figure out what "Developer Features" is enabling that would cause Compat mode to work.

@SenorBlanco
Copy link
Collaborator

(Note that "WebGPU Developer Features" is exposed in chrome://flags, while "WebGPU Experimental Features" is not. So the former is easy to enable in Canary while the latter requires command-line flags.)

@SenorBlanco
Copy link
Collaborator

Another datapoint: on a local build of Chrome/Linux (GL), these flags cause the samples to work:
out/Release/chrome --enable-features=WebGPUService,WebGPUCompatibilityMode

This doesn't:
out/Release/chrome --enable-features=WebGPUService

@SenorBlanco
Copy link
Collaborator

This looks like a Chrome bug; filed here: https://issues.chromium.org/issues/430248354. Sorry for the noise.

@beaufortfrancois
Copy link
Collaborator Author

Oh! According to the code below, "WebGPU Developer Features" is actually enabling WebGPU Compatibility Mode.

  if (force_webgpu_compat_ ||
      (static_cast<wgpu::FeatureLevel>(options->featureLevel) ==
           wgpu::FeatureLevel::Compatibility &&
       (safety_level_ == webgpu::SafetyLevel::kUnsafe ||
        safety_level_ == webgpu::SafetyLevel::kSafeExperimental || // <-- this is true with WebGPU Developer Features
        base::FeatureList::IsEnabled(features::kWebGPUCompatibilityMode)))) {
    feature_level = wgpu::FeatureLevel::Compatibility;
  }

Source: https://source.chromium.org/chromium/chromium/src/+/main:gpu/command_buffer/service/webgpu_decoder_impl.cc;l=1349;drc=b97f6486e3ccf883f2e2f085abfb4829d8ca6f8d

  if (gpu_preferences.enable_webgpu_developer_features ||
      gpu_preferences.enable_webgpu_experimental_features) {
    safety_level_ = webgpu::SafetyLevel::kSafeExperimental;
  }

Source: https://source.chromium.org/chromium/chromium/src/+/main:gpu/command_buffer/service/webgpu_decoder_impl.cc;l=1132;drc=b97f6486e3ccf883f2e2f085abfb4829d8ca6f8d

Moreover, "WebGPU Experimental Features" is a experimental blink runtime feature. It means users can enable it by enabling the "Experimental Web Platform Features" flag in chrome://flags

    {
      // WebGPU experimental features are meant for features that would
      // eventually land in the WebGPU spec.
      name: "WebGPUExperimentalFeatures",
      status: "experimental",
      public: true,
    },
    ```

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