Skip to content

Conversation

@Richard-Yunchao
Copy link

@Richard-Yunchao Richard-Yunchao commented Apr 22, 2021

It defines renderable format, and color renderable format, and
depth or stencil renderable format as well.

It removes one issue that rgb9e5unorm cannot be used as a color
attachment because rgb9e5unorm is not color renderable. Any
format has a -snorm suffix or any compressed format cannot used
as a color attachment because all of them are not color
renderable. We have already added this validation rule in
GPURenderPassColorAttachment Valid Usage. We don't need to
have separate text in the spec for rgb9e5unorm particularly.

renderable format definition is also needed for texture creation.
If a format is not a renderable format, it will fail with its
sampleCount > 1, or when its usage include RENDER_ATTACHMENT.
The later validation rule also make rgb9e5unorm + color attachment
combination fail.


Preview | Diff

It defines renderable format, and color renderable format, and
depth or stencil renderable format as well.

It removes one issue that rgb9e5unorm cannot be used as a color
attachment because rgb9e5unorm is not color renderable. Any
format has a -snorm suffix or any compressed format cannot used
as a color attachment because all of them are not color
renderable. We have already added this validation rule in
`GPURenderPassColorAttachment Valid Usage`. We don't need to
have separate text in the spec for rgb9e5unorm particularly.

renderable format definition is also needed for texture creation.
If a format is not a renderable format, it will fail with its
sampleCount > 1, or when its usage include `RENDER_ATTACHMENT`.
The later validation rule also make rgb9e5unorm + color attachment
combination fail.
Co-authored-by: Kai Ninomiya <[email protected]>
spec/index.bs Outdated
or <dfn>depth or stencil renderable format</dfn>.
- If a format is listed in [[#plain-color-formats]] with {{GPUTextureUsage/RENDER_ATTACHMENT}}
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
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
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
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
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
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
Author

Choose a reason for hiding this comment

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

Thanks!

@kvark kvark merged commit 17da038 into gpuweb:main Apr 22, 2021
ben-clayton pushed a commit to ben-clayton/gpuweb that referenced this pull request Sep 6, 2022
…puweb#1653)

The queryType of each timestampWrite in timestampWrites should be
`timestamp`. So, this PR adds a test to check if a validation error
is generated if all query set types aren't `timestamp`.

Issue: gpuweb#1618
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants