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

Define depthWriteEnabled as WGPUOptionalBool #308

Merged
merged 3 commits into from
Jul 22, 2024

Conversation

beaufortfrancois
Copy link
Contributor

@beaufortfrancois beaufortfrancois commented Jul 8, 2024

FIX #235

@beaufortfrancois
Copy link
Contributor Author

@kainino0x Can you review?

@kainino0x kainino0x self-requested a review July 11, 2024 23:29
webgpu.h Outdated
Comment on lines 411 to 413
WGPUOptionalBool_Undefined = 0x00000000,
WGPUOptionalBool_False = 0x00000001,
WGPUOptionalBool_True = 0x00000002,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be False=0, True=1, Undefined=2
per #235 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As raised in https://issues.chromium.org/issues/42241167#comment6, I've noticed Dawn asserts that "undefined" values must be 0 in dawn_json_generator.py. Shall we loosen this restriction in https://source.chromium.org/chromium/chromium/src/+/main:third_party/dawn/generator/dawn_json_generator.py;l=147;drc=83d3e7fc97d66a79c944c24b7ad18f549a5a150f?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh yes, sorry I forgot to reply to that.
There's a strong reason to have False=0, True=1 so yes, I think we need to do that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kainino0x I've updated this PR with your suggested changes.

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!

@kainino0x kainino0x merged commit 497a9b2 into webgpu-native:main Jul 22, 2024
4 checks passed
aarongable pushed a commit to chromium/chromium that referenced this pull request Aug 16, 2024
- No operational changes.

webgpu-native/webgpu-headers#308

Bug: 42241167
Change-Id: I3874f99cf2c07d81cfededb1b92a8b138107eded
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5683307
Commit-Queue: Loko Kung <[email protected]>
Reviewed-by: Loko Kung <[email protected]>
Reviewed-by: Austin Eng <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1343063}
@beaufortfrancois beaufortfrancois deleted the wgpuoptionalbool branch August 19, 2024 12:44
copybara-service bot pushed a commit to google/dawn that referenced this pull request Aug 19, 2024
copybara-service bot pushed a commit to google/dawn that referenced this pull request Aug 23, 2024
This reverts commit 8c230a7.

Reason for revert: Probably causing roll failures on Windows build, example: https://ci.chromium.org/ui/p/chromium/builders/try/win-rel/727795/overview

Original change's description:
> [webgpu-headers] Define depthWriteEnabled as WGPUOptionalBool
>
> The following CLs must be merged before:
> - https://chromium-review.googlesource.com/c/chromium/src/+/5683307
> - https://skia-review.googlesource.com/c/skia/+/874238
>
> webgpu-native/webgpu-headers#308
>
> Bug: 42241167
> Change-Id: Ib6266b6981fb8caf38b734977ceaeeeed2cf55f9
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/197214
> Reviewed-by: Austin Eng <[email protected]>
> Commit-Queue: Fr <[email protected]>

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 42241167
Change-Id: I4fd367f0fb2b23ded925822ba238c64c43a9c3d3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/203463
Reviewed-by: Austin Eng <[email protected]>
Reviewed-by: Brandon Jones <[email protected]>
Commit-Queue: Brandon Jones <[email protected]>
Commit-Queue: Loko Kung <[email protected]>
copybara-service bot pushed a commit to google/dawn that referenced this pull request Aug 27, 2024
Fixes the crash caused via ApplyClearColorValueWithDrawHelper not
explicitly setting depthWriteEnabled to false.

This is a reland of commit 8c230a7

Original change's description:
> [webgpu-headers] Define depthWriteEnabled as WGPUOptionalBool
>
> The following CLs must be merged before:
> - https://chromium-review.googlesource.com/c/chromium/src/+/5683307
> - https://skia-review.googlesource.com/c/skia/+/874238
>
> webgpu-native/webgpu-headers#308
>
> Bug: 42241167
> Change-Id: Ib6266b6981fb8caf38b734977ceaeeeed2cf55f9
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/197214
> Reviewed-by: Austin Eng <[email protected]>
> Commit-Queue: Fr <[email protected]>

Bug: 42241167
Change-Id: I18a1ae28d9df218da25dae57ad64c931e380221e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/203774
Commit-Queue: Loko Kung <[email protected]>
Reviewed-by: Kai Ninomiya (OOO until 8月23日) <[email protected]>
copybara-service bot pushed a commit to google/dawn that referenced this pull request Aug 28, 2024
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.

webgpu.h doesn't represent tri-state depthWriteEnabled
2 participants