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

Add WGPUFeatureLevel #399

Merged
merged 3 commits into from
Nov 12, 2024
Merged

Add WGPUFeatureLevel #399

merged 3 commits into from
Nov 12, 2024

Conversation

kainino0x
Copy link
Collaborator

@kainino0x kainino0x commented Nov 11, 2024

I also changed the struct order to go: required -> optional -> native-only optional.

Issue #293 - does not officially resolve it yet because we need to decide on defaulting.
(dawn bug https://crbug.com/378514251)

@kainino0x kainino0x requested a review from lokokung November 11, 2024 23:48
@kainino0x kainino0x enabled auto-merge (squash) November 12, 2024 01:49
@kainino0x kainino0x merged commit f848447 into webgpu-native:main Nov 12, 2024
5 checks passed
@kainino0x kainino0x deleted the featurelevel branch November 12, 2024 01:51
/**
* "Feature level" for the adapter request. If an adapter is returned, it must support the features and limits in the requested feature level.
*
* Implementations may ignore @ref WGPUFeatureLevel_Compatibility and provide @ref WGPUFeatureLevel_Core instead. @ref WGPUFeatureLevel_Core is the default in the JS API, but in C, this field is **required** (must not be undefined).
Copy link
Collaborator

Choose a reason for hiding this comment

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

Prior to this it would have been allowed to call wgpuInstanceRequestAdapter(instance, nullptr) to get any adapter that the instance chooses. Can't we say that it defaults to core like the JS API?

typedef enum WGPUFeatureLevel {
/**
* `0x00000001`.
* "Compatibility" profile which can be supported on OpenGL ES 3.1.
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: and D3D11

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm unclear on this, I thought we came to the conclusion D3D11 could actually support core? Or did that turn out not to be true?

Copy link
Collaborator

Choose a reason for hiding this comment

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

We guessed that maybe it is possible but we never tried. So for now it is safe to assume that D3D11 only provides compat.

copybara-service bot pushed a commit to google/dawn that referenced this pull request Dec 11, 2024
Spec PR: webgpu-native/webgpu-headers#399

Bug: 366151404

Change-Id: I3b684f1e4f72245b9adcf25d567b9d49c3ae27a3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/218514
Reviewed-by: Kai Ninomiya <[email protected]>
Commit-Queue: Fr <[email protected]>
copybara-service bot pushed a commit to google/dawn that referenced this pull request Dec 11, 2024
Spec PR: webgpu-native/webgpu-headers#399

Bug: 366151404
Change-Id: I6c19179b80bd20540080eee69b4ca9177bbd5caf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/218534
Commit-Queue: Fr <[email protected]>
Reviewed-by: Kai Ninomiya <[email protected]>
copybara-service bot pushed a commit to google/dawn that referenced this pull request Dec 11, 2024
Spec PR: webgpu-native/webgpu-headers#399

Bug: 366151404
Change-Id: I4d7ee2d4e2cf7bc73b8ba60f3c1d0652c5711aae
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/218535
Reviewed-by: Kai Ninomiya <[email protected]>
Commit-Queue: Fr <[email protected]>
copybara-service bot pushed a commit to google/dawn that referenced this pull request Jan 2, 2025
Spec PR: webgpu-native/webgpu-headers#399

Bug: 366151404
Change-Id: I4be2afaaf4a92fbf0df0172e1a00f7db212f720f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/220894
Reviewed-by: Loko Kung <[email protected]>
Commit-Queue: Fr <[email protected]>
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