diff --git a/webgpu.h b/webgpu.h index 909ec4c0..0b142a14 100644 --- a/webgpu.h +++ b/webgpu.h @@ -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; diff --git a/webgpu.yml b/webgpu.yml index ca9e714a..0bf293bc 100644 --- a/webgpu.yml +++ b/webgpu.yml @@ -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