Skip to content

webgpu: Add the latest spec compliant GPUAdapterInfo#39960

Merged
sagudev merged 1 commit intoservo:mainfrom
tharkum:webgpu-gpuadapter-info-attribute
Oct 21, 2025
Merged

webgpu: Add the latest spec compliant GPUAdapterInfo#39960
sagudev merged 1 commit intoservo:mainfrom
tharkum:webgpu-gpuadapter-info-attribute

Conversation

@tharkum
Copy link
Copy Markdown
Contributor

@tharkum tharkum commented Oct 17, 2025

According to the WebGPU specification there are some missing readonly attributes (subgroupMinSize, subgroupMaxSize, isFallbackAdapter) for GPUAdapterInfo IDL interface.

See https://gpuweb.github.io/gpuweb/#gpuadapterinfo

Added the new readonly attributes:

Removed marked as the deprecated the following method and attribute from GPUAdapter interface:

  • 'requestAdapterInfo' method
  • 'isFallbackAdapter' attribute

Testing: Improvements in WebGPU CTS expectations

  • webgpu:api,operation,adapter,info:adapter_info:*
  • webgpu:api,operation,adapter,info:device_matches_adapter:*
  • webgpu:api,operation,adapter,info:same_object:*
  • webgpu:api,operation,adapter,info:subgroup_sizes:*
  • webgpu:api,operation,adapter,requestAdapter:requestAdapter:*
  • webgpu:idl,javascript:*

@tharkum tharkum requested a review from sagudev as a code owner October 17, 2025 14:01
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Oct 17, 2025
@tharkum tharkum added the T-webgpu Do a try run on Linux of the WebGPU CTS label Oct 17, 2025
@github-actions github-actions bot removed the T-webgpu Do a try run on Linux of the WebGPU CTS label Oct 17, 2025
@github-actions
Copy link
Copy Markdown

🔨 Triggering try run (#18595050360) for Linux (Production, WPT)

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Oct 17, 2025
@github-actions
Copy link
Copy Markdown

Test results for linux-wpt from try job (#18595050360):

Flaky unexpected result (23)
  • OK /_webgpu/webgpu/cts.https.html?q=webgpu:api,operation,memory_sync,buffer,multiple_buffers:wr:*
    • PASS [expected FAIL] subtest: :boundary="command-buffer";readOp="b2t-copy";readContext="command-encoder";writeOp="storage";writeContext="render-bundle-encoder"
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,binary,af_division:vector:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,binary,af_matrix_addition:matrix:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,binary,f16_matrix_scalar_multiplication:matrix_scalar_compound:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,binary,f16_remainder:scalar_vector:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,binary,f32_addition:scalar_vector:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,binary,f32_comparison:equals:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,binary,f32_division:scalar_compound:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,binary,f32_division:vector_scalar:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,binary,i32_arithmetic:division_vector_scalar_compound:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,binary,u32_arithmetic:multiplication_scalar_vector:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,binary,u32_comparison:less_equals:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,call,builtin,degrees:abstract_float:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,call,builtin,distance:f16_vec4:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,call,builtin,dot:f16_vec4:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,call,builtin,dot:u32_vec2:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,call,builtin,floor:abstract_float:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,call,builtin,max:f16:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,call,builtin,modf:abstract_vec3_whole:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,call,builtin,modf:f32_vec2_whole:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,call,builtin,reflect:abstract_float_vec4:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,call,builtin,sign:i32:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,call,builtin,trunc:f32:*
Stable unexpected results (3)
  • OK /_webgpu/webgpu/cts.https.html?q=webgpu:api,operation,memory_sync,buffer,multiple_buffers:rw:*
    • PASS [expected FAIL] subtest: :boundary="command-buffer";readOp="constant-uniform";readContext="render-bundle-encoder";writeOp="t2b-copy";writeContext="command-encoder"
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,call,builtin,length:f16:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,unary,f32_conversion:abstract_float:*

@github-actions
Copy link
Copy Markdown

⚠️ Try run (#18595050360) failed.

@sagudev
Copy link
Copy Markdown
Member

sagudev commented Oct 17, 2025

OK /_webgpu/webgpu/cts.https.html?q=webgpu:api,operation,memory_sync,buffer,multiple_buffers:rw:*

This is known flake, but let's wait for #39962 then rebase this PR.

@tharkum tharkum force-pushed the webgpu-gpuadapter-info-attribute branch from 21ac67f to a38c329 Compare October 21, 2025 08:13
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Oct 21, 2025
@tharkum tharkum changed the title webgpu: Add the GPUAdapter 'info' IDL attribute webgpu: Add the latest spec compliant GPUAdapterInfo Oct 21, 2025
@tharkum
Copy link
Copy Markdown
Contributor Author

tharkum commented Oct 21, 2025

@sagudev < FYI, after CTS update were found few more tests for GPUAdapterInfo, and some of them are linked with 'GPUAdapter.info + GPUDevice.adapterInfo', so I decided to combine all possible changes together in one PR and align it with the latest specification state.

@tharkum tharkum added the T-webgpu Do a try run on Linux of the WebGPU CTS label Oct 21, 2025
@tharkum tharkum requested a review from sagudev October 21, 2025 08:18
@github-actions github-actions bot removed the T-webgpu Do a try run on Linux of the WebGPU CTS label Oct 21, 2025
@github-actions
Copy link
Copy Markdown

🔨 Triggering try run (#18677499764) for Linux (Production, WPT)

// adapter as reported by the driver. To preserve privacy, the user agent may instead set
// adapterInfo.description to the empty string or a reasonable approximation of a
// description.
let description = DOMString::from_string(info.name.clone());
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I changed info.driver_info to info.name because it has more detailed information about adapter.

DEFAULT ADAPTER:
name: "Intel(R) Graphics (RPL-S)", vendor: 32902, device: 42880, device_type: IntegratedGpu, driver: "Intel open-source Mesa driver", driver_info: "Mesa 23.2.1-1ubuntu3.1~22.04.3", backend: Vulkan

FORCED FALLBACK ADAPTER:
name: "llvmpipe (LLVM 15.0.7, 256 bits)", vendor: 65541, device: 0, device_type: Cpu, driver: "llvmpipe", driver_info: "Mesa 23.2.1-1ubuntu3.1~22.04.3 (LLVM 15.0.7)", backend: Vulkan

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should also report wgpu backend here to make it more useful, so you would get Intel(R) Graphics (RPL-S) via Vulkan backend, but we can do that in follow up.

@github-actions
Copy link
Copy Markdown

Test results for linux-wpt from try job (#18677499764):

Flaky unexpected result (6)
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,binary,af_subtraction:scalar_vector:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,binary,f32_matrix_matrix_multiplication:matrix_matrix_compound:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,binary,u32_arithmetic:subtraction_vector_scalar_compound:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,call,builtin,distance:abstract_float_vec2:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,call,builtin,inversesqrt:abstract_float:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,call,builtin,modf:abstract_vec3_fract:*
Stable unexpected results (6)
  • OK /_webgpu/webgpu/cts.https.html?q=webgpu:api,operation,adapter,requestAdapter:requestAdapter:*
    • FAIL [expected PASS] subtest: :powerPreference="_undef_";forceFallbackAdapter="_undef_"

      assert_unreached: 
        - EXPECTATION FAILED
          expect@https://web-platform.test:8443/_webgpu/webgpu/common/framework/fixture.js:373:34
          @https://web-platform.test:8443/_webgpu/webgpu/webgpu/api/operation/adapter/requestAdapter.spec.js:127:5
       Reached unreachable code
      

    • FAIL [expected PASS] subtest: :powerPreference="_undef_";forceFallbackAdapter=false

      assert_unreached: 
        - EXPECTATION FAILED
          expect@https://web-platform.test:8443/_webgpu/webgpu/common/framework/fixture.js:373:34
          @https://web-platform.test:8443/_webgpu/webgpu/webgpu/api/operation/adapter/requestAdapter.spec.js:127:5
       Reached unreachable code
      

    • FAIL [expected PASS] subtest: :powerPreference="low-power";forceFallbackAdapter="_undef_"

      assert_unreached: 
        - EXPECTATION FAILED
          expect@https://web-platform.test:8443/_webgpu/webgpu/common/framework/fixture.js:373:34
          @https://web-platform.test:8443/_webgpu/webgpu/webgpu/api/operation/adapter/requestAdapter.spec.js:127:5
       Reached unreachable code
      

    • FAIL [expected PASS] subtest: :powerPreference="low-power";forceFallbackAdapter=false

      assert_unreached: 
        - EXPECTATION FAILED
          expect@https://web-platform.test:8443/_webgpu/webgpu/common/framework/fixture.js:373:34
          @https://web-platform.test:8443/_webgpu/webgpu/webgpu/api/operation/adapter/requestAdapter.spec.js:127:5
       Reached unreachable code
      

    • FAIL [expected PASS] subtest: :powerPreference="high-performance";forceFallbackAdapter="_undef_"

      assert_unreached: 
        - EXPECTATION FAILED
          expect@https://web-platform.test:8443/_webgpu/webgpu/common/framework/fixture.js:373:34
          @https://web-platform.test:8443/_webgpu/webgpu/webgpu/api/operation/adapter/requestAdapter.spec.js:127:5
       Reached unreachable code
      

    • FAIL [expected PASS] subtest: :powerPreference="high-performance";forceFallbackAdapter=false

      assert_unreached: 
        - EXPECTATION FAILED
          expect@https://web-platform.test:8443/_webgpu/webgpu/common/framework/fixture.js:373:34
          @https://web-platform.test:8443/_webgpu/webgpu/webgpu/api/operation/adapter/requestAdapter.spec.js:127:5
       Reached unreachable code
      

  • OK /_webgpu/webgpu/cts.https.html?q=webgpu:idl,javascript:getter_replacement:*
    • PASS [expected FAIL] subtest: :type="adapter"
    • PASS [expected FAIL] subtest: :type="device"
  • OK /_webgpu/webgpu/cts.https.html?q=webgpu:idl,javascript:obj,for_in:*
    • PASS [expected FAIL] subtest: :type="adapter"
  • OK /_webgpu/webgpu/cts.https.html?q=webgpu:idl,javascript:readonly_properties:*
    • PASS [expected FAIL] subtest: :type="adapter"
    • PASS [expected FAIL] subtest: :type="device"
  • OK /_webgpu/webgpu/cts.https.html?q=webgpu:idl,javascript:sameObject:*
    • PASS [expected FAIL] subtest: :type="adapter"
    • PASS [expected FAIL] subtest: :type="device"
  • TIMEOUT [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,memory_model,barrier:workgroup_barrier_store_load:*
    • TIMEOUT [expected PASS] subtest: :accessValueType="u32";memType="non_atomic_texture";accessPair="wr";normalBarrier=true

      Test timed out
      

    • NOTRUN [expected PASS] subtest: :accessValueType="u32";memType="non_atomic_texture";accessPair="wr";normalBarrier=false

@github-actions
Copy link
Copy Markdown

⚠️ Try run (#18677499764) failed.

@tharkum tharkum force-pushed the webgpu-gpuadapter-info-attribute branch from a38c329 to 2d38075 Compare October 21, 2025 11:50
@tharkum
Copy link
Copy Markdown
Contributor Author

tharkum commented Oct 21, 2025

@tharkum tharkum added the T-webgpu Do a try run on Linux of the WebGPU CTS label Oct 21, 2025
@github-actions github-actions bot removed the T-webgpu Do a try run on Linux of the WebGPU CTS label Oct 21, 2025
@github-actions
Copy link
Copy Markdown

🔨 Triggering try run (#18683095573) for Linux (Production, WPT)

@github-actions
Copy link
Copy Markdown

Test results for linux-wpt from try job (#18683095573):

Flaky unexpected result (6)
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,binary,af_subtraction:scalar_vector:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,binary,ai_arithmetic:division_scalar_vector:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,binary,f32_remainder:vector_scalar_compound:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,binary,u32_arithmetic:division_vector_scalar_compound:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,binary,u32_arithmetic:subtraction_vector_scalar_compound:*
  • CRASH [expected PASS] /_webgpu/webgpu/webgpu/web_platform/reftests/canvas_composite_alpha_rgba8unorm_opaque_copy.https.html
Stable unexpected results (2)
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,binary,f32_remainder:scalar_compound:*
  • CRASH [expected OK] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,call,builtin,cos:f32:*

@github-actions
Copy link
Copy Markdown

⚠️ Try run (#18683095573) failed.

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Oct 21, 2025
@sagudev sagudev enabled auto-merge October 21, 2025 15:04
According to the WebGPU specification there are some
missing readonly attributes (subgroupMinSize, subgroupMaxSize,
isFallbackAdapter) for GPUAdapterInfo IDL interface.

See https://gpuweb.github.io/gpuweb/#gpuadapterinfo

Added the new readonly attributes:
- GPUAdapter 'info' attribute
  https://gpuweb.github.io/gpuweb/#dom-gpuadapter-info
- GPUDevice 'adapterInfo' attribute
  https://gpuweb.github.io/gpuweb/#dom-gpudevice-adapterinfo

Removed marked as the deprecated the following method and
attribute from GPUAdapter interface:
- 'requestAdapterInfo' method
- 'isFallbackAdapter' attribute

Testing: Improvements in WebGPU CTS expectations
- webgpu:api,operation,adapter,info:adapter_info:*
- webgpu:api,operation,adapter,info:device_matches_adapter:*
- webgpu:api,operation,adapter,info:same_object:*
- webgpu:api,operation,adapter,info:subgroup_sizes:*
- webgpu:api,operation,adapter,requestAdapter:requestAdapter:*

Signed-off-by: Andrei Volykhin <[email protected]>
@sagudev sagudev force-pushed the webgpu-gpuadapter-info-attribute branch from 2d38075 to ed88de9 Compare October 21, 2025 17:06
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Oct 21, 2025
@sagudev
Copy link
Copy Markdown
Member

sagudev commented Oct 21, 2025

I rebased to pick up #40058 which fixes CI.

@sagudev sagudev added this pull request to the merge queue Oct 21, 2025
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Oct 21, 2025
Merged via the queue into servo:main with commit 65620b6 Oct 21, 2025
33 checks passed
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Oct 21, 2025
@tharkum tharkum deleted the webgpu-gpuadapter-info-attribute branch October 21, 2025 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants