Skip to content

Conversation

@tharkum
Copy link
Contributor

@tharkum tharkum commented Oct 22, 2025

According to specification a fallback adapter may still be returned if forceFallbackAdapter is set to false and either no other appropriate adapter is available or the user agent chooses to return a fallback adapter.
https://gpuweb.github.io/gpuweb/#dom-gpurequestadapteroptions-forcefallbackadapter

Therefore, checking whether an adapter is a fallback adapter should only be performed if forceFallbackAdapter is true.

Issue: fixes #4480


Requirements for PR author:

  • All missing test coverage is tracked with "TODO" or .unimplemented().
  • New helpers are /** documented */ and new helper files are found in helper_index.txt.
  • Test behaves as expected in a WebGPU implementation. (If not passing, explain above.)
  • Test have be tested with compatibility mode validation enabled and behave as expected. (If not passing, explain above.)

Requirements for reviewer sign-off:

  • Tests are properly located in the test tree.
  • Test descriptions allow a reader to "read only the test plans and evaluate coverage completeness", and accurately reflect the test code.
  • Tests provide complete coverage (including validation control cases). Missing coverage MUST be covered by TODOs.
  • Helpers and types promote readability and maintainability.

When landing this PR, be sure to make any necessary issue status updates.

According to specification a fallback adapter may still be returned
if forceFallbackAdapter is set to false and either no other appropriate
adapter is available or the user agent chooses to return a fallback adapter.
https://gpuweb.github.io/gpuweb/#dom-gpurequestadapteroptions-forcefallbackadapter

Therefore, checking whether an adapter is a fallback adapter should only
be performed if forceFallbackAdapter is true.

Issue: gpuweb#4480

Signed-off-by: Andrei Volykhin <[email protected]>
@tharkum
Copy link
Contributor Author

tharkum commented Oct 24, 2025

@kainino0x < Please take a look.

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.

Sorry, got behind on reviews for a few days. Thank you for the fix!

@kainino0x kainino0x enabled auto-merge (squash) October 24, 2025 22:11
@kainino0x kainino0x disabled auto-merge October 24, 2025 22:13
@kainino0x kainino0x force-pushed the webgpu-api-request-adapter-fallback branch from 5c395ea to 4f74686 Compare October 24, 2025 22:14
@kainino0x kainino0x enabled auto-merge (squash) October 24, 2025 22:14
@kainino0x kainino0x merged commit eefe6f3 into gpuweb:main Oct 24, 2025
1 check passed
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.

Test webgpu:api,operation,adapter,requestAdapter:requestAdapter fails with non expected fallback adapter

2 participants