Skip to content

Commit

Permalink
Validate color state descriptors
Browse files Browse the repository at this point in the history
  • Loading branch information
kvark committed Oct 5, 2020
1 parent b80c166 commit 251649e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions spec/index.bs
Expand Up @@ -3662,6 +3662,9 @@ Issue: link to the semantics of SV_SampleIndex and SV_Coverage in WGSL spec.
|descriptor|.{{GPUPipelineDescriptorBase/layout}}) succeeds.
- |descriptor|.{{GPURenderPipelineDescriptor/colorStates}}.length is less than
or equal to 4.
- Each |colorState| layout descriptor in the list
|descriptor|.{{GPURenderPipelineDescriptor/colorStates}}
passes [$validating GPUColorStateDescriptor$](|colorState|).
- [$validating GPUVertexStateDescriptor$](|descriptor|.{{GPURenderPipelineDescriptor/vertexState}},
|descriptor|.{{GPURenderPipelineDescriptor/vertexStage}}) passes.
- If |descriptor|.{{GPURenderPipelineDescriptor/alphaToCoverageEnabled}} is `true`:
Expand Down Expand Up @@ -3846,6 +3849,21 @@ enum GPUBlendOperation {
};
</script>

<div algorithm>
<dfn abstract-op>validating GPUColorStateDescriptor</dfn>(descriptor)
**Arguments:**
- {{GPUColorStateDescriptor}} |descriptor|

Return `true`, if and only if, all of the following conditions are satisfied:

1. |descriptor|.{{GPUColorStateDescriptor/format}} is listed in {#plain-color-formats}
with {{GPUTextureUsage/OUTPUT_ATTACHMENT}} capability.
1. |descriptor|.{{GPUColorStateDescriptor/alphaBlend}} and |descriptor|.{{GPUColorStateDescriptor/colorBlend}}
are either both defaults, or |descriptor|.{{GPUColorStateDescriptor/format}} has
{{GPUTextureComponentType/"float"}} component type.
1. |descriptor|.{{GPUColorStateDescriptor/writeMask}} is less than 16
</div>

### Depth/Stencil State ### {#depth-stencil-state}

<script type=idl>
Expand Down

0 comments on commit 251649e

Please sign in to comment.