Skip to content

Commit

Permalink
depthClearValue is undefined iff NaN (#467)
Browse files Browse the repository at this point in the history
  • Loading branch information
kainino0x authored Dec 11, 2024
1 parent 2e778e4 commit c2b2d77
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
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

0 comments on commit c2b2d77

Please sign in to comment.