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

depthClearValue is undefined iff NaN #467

Merged
merged 3 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions webgpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -2455,6 +2455,12 @@ typedef struct WGPURenderPassDepthStencilAttachment {
*/
WGPUStoreOp depthStoreOp;
/**
* If NaN, indicates an `undefined` value (as defined by the JS spec).
* Use @ref WGPU_DEPTH_CLEAR_VALUE_UNDEFINED to indicate this semantically.
*
* NaN is determined by `isnan(depthClearValue) != 0`.
* (Do not use an equality check, because `NaN == NaN` is false.)
*
* The `INIT` macro sets this to @ref WGPU_DEPTH_CLEAR_VALUE_UNDEFINED.
*/
float depthClearValue;
Expand Down
6 changes: 5 additions & 1 deletion webgpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2454,7 +2454,11 @@ structs:
default: undefined
- name: depth_clear_value
doc: |
TODO
If NaN, indicates an `undefined` value (as defined by the JS spec).
Use @ref WGPU_DEPTH_CLEAR_VALUE_UNDEFINED to indicate this semantically.

NaN is determined by `isnan(depthClearValue) != 0`.
(Do not use an equality check, because `NaN == NaN` is false.)
type: float32
default: constant.depth_clear_value_undefined
- name: depth_read_only
Expand Down
Loading