Skip to content
Merged
Changes from 1 commit
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
16 changes: 12 additions & 4 deletions spec/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2544,7 +2544,12 @@ note that the set of representable values is not exactly the same:
for depth24unorm, 1 ULP has a constant value of 1 / (2<sup>24</sup> &minus; 1);
for depth32float, 1 ULP has a variable value no greater than 1 / (2<sup>24</sup>).

Issue: {{GPUTextureFormat/"rgb9e5ufloat"}} cannot be used as a color attachment.
A renderable format is either <dfn>color renderable format</dfn>,
Comment thread
kvark marked this conversation as resolved.
Outdated
or <dfn>depth or stencil renderable format</dfn>.
- If a format is listed in {#plain-color-formats} with {{GPUTextureUsage/RENDER_ATTACHMENT}}
Comment thread
Richard-Yunchao marked this conversation as resolved.
Outdated
capability, it is a color renderable format. Any other format is not a color renderable format.
- Any depth/stencil format is a depth or stencil renderable format. Any other format is not
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this definition? wouldn't it be simpler to just say "it has to be a depth of stencil format", referring to the table, instead of saying "it has to be [=depth or stencil renderable format=]"? the extra indirection here may be confusing.

Copy link
Copy Markdown
Author

@Richard-Yunchao Richard-Yunchao Apr 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that I am defining 3 things. The purpose is to define renderable format, which is useful for texture creation validation (see the comment of this PR). color renderable format and depth or stencil renderable format are sort of the by-products, but they are also useful for a couple of places in the spec (but without definition), so I updated these places and directed to the definitions here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It sounds to me that you really want to define renderable format and color renderable format, but the depth-stencil renderable is still redundant?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, I will add <dfn>, </dfn> stuff for renderable format in the next PR for texture creation validation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, if that's simpler for you.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

a depth or stencil renderable format.

# Samplers # {#samplers}

Expand Down Expand Up @@ -6153,7 +6158,7 @@ dictionary GPURenderPassColorAttachment {
Given a {{GPURenderPassColorAttachment}} |this| the following validation rules
apply:

1. |this|.{{GPURenderPassColorAttachment/view}} must have a renderable color format.
1. |this|.{{GPURenderPassColorAttachment/view}} must have a [=color renderable format=].
1. |this|.{{GPURenderPassColorAttachment/view}}.{{GPUTextureView/[[texture]]}}.{{GPUTexture/[[textureUsage]]}}
must contain {{GPUTextureUsage/RENDER_ATTACHMENT}}.
1. |this|.{{GPURenderPassColorAttachment/view}} must be a view of a single [=subresource=].
Expand Down Expand Up @@ -6244,8 +6249,8 @@ dictionary GPURenderPassDepthStencilAttachment {
Given a {{GPURenderPassDepthStencilAttachment}} |this| the following validation
rules apply:

1. |this|.{{GPURenderPassDepthStencilAttachment/view}} must have a renderable
depth-and/or-stencil format.
1. |this|.{{GPURenderPassDepthStencilAttachment/view}} must have a [=depth or stencil renderable
format=].
1. |this|.{{GPURenderPassDepthStencilAttachment/view}} must be a view of a
single [=texture subresource=].
1. |this|.{{GPURenderPassDepthStencilAttachment/view}}.{{GPUTexture/[[textureUsage]]}}
Expand Down Expand Up @@ -8329,6 +8334,9 @@ Only formats with {{GPUTextureSampleType}} {{GPUTextureSampleType/"float"}} can
The {{GPUTextureUsage/STORAGE|GPUTextureUsage.STORAGE}} column specifies the support for {{GPUTextureUsage/STORAGE}}
usage in the core API, including both {{GPUStorageTextureAccess/"read-only"}} and {{GPUStorageTextureAccess/"write-only"}}.

The {{GPUTextureUsage/STORAGE|GPUTextureUsage.RENDER_ATTACHMENT}} column specifies the support for
Comment thread
kvark marked this conversation as resolved.
{{GPUTextureUsage/RENDER_ATTACHMENT}} usage in the core API.

<table class='data'>
<thead class=stickyheader>
<tr>
Expand Down