Skip to content

Commit

Permalink
Require depth clear value in 0.0-1.0 (gpuweb#2421)
Browse files Browse the repository at this point in the history
* Require depth clear value in 0.0-1.0

* clarify handling of union
  • Loading branch information
kainino0x authored Dec 16, 2021
1 parent 8f1fa3c commit f700cd7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions spec/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -7266,11 +7266,13 @@ dictionary GPURenderPassDepthStencilAttachment {

: <dfn>depthLoadValue</dfn>
::
If a {{GPULoadOp}}, indicates the load operation to perform on
If this is a {{GPULoadOp}}, it indicates the load operation to perform on
{{GPURenderPassDepthStencilAttachment/view}}'s depth component prior to
executing the render pass.
If a `float`, indicates the value to clear {{GPURenderPassDepthStencilAttachment/view}}'s

Otherwise, this is a `float` indicating the value to clear {{GPURenderPassDepthStencilAttachment/view}}'s
depth component to prior to executing the render pass.
Must be between 0.0 and 1.0, inclusive. <!-- unless unrestricted depth is enabled -->

Note: It is recommended to prefer a clear-value; see {{GPULoadOp/"load"}}.

Expand Down Expand Up @@ -7317,6 +7319,8 @@ dictionary GPURenderPassDepthStencilAttachment {
a single [=mipmap level=], single [=array layer=], and all the [=aspects=] in the texture.
- |this|.{{GPURenderPassDepthStencilAttachment/view}}.{{GPUTexture/[[descriptor]]}}.{{GPUTextureDescriptor/usage}}
must contain {{GPUTextureUsage/RENDER_ATTACHMENT}}.
- If |this|.{{GPURenderPassDepthStencilAttachment/depthLoadValue}} is a clear value (has type `float`),
it must be between 0.0 and 1.0, inclusive. <!-- unless unrestricted depth is enabled -->
- If |this|.{{GPURenderPassDepthStencilAttachment/view}}.{{GPUTextureView/[[descriptor]]}}.{{GPUTextureViewDescriptor/format}}
is a [=combined depth-stencil format=]:
- |this|.{{GPURenderPassDepthStencilAttachment/depthReadOnly}} must be equal to |this|.{{GPURenderPassDepthStencilAttachment/stencilReadOnly}}
Expand Down

0 comments on commit f700cd7

Please sign in to comment.