-
Notifications
You must be signed in to change notification settings - Fork 370
Add the definition of renderable format #1653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
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.
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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> − 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>, | ||
| or <dfn>depth or stencil renderable format</dfn>. | ||
| - If a format is listed in {#plain-color-formats} with {{GPUTextureUsage/RENDER_ATTACHMENT}} | ||
|
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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note that I am defining 3 things. The purpose is to define
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It sounds to me that you really want to define
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. BTW, I will add
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok, if that's simpler for you.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! |
||
| a depth or stencil renderable format. | ||
|
|
||
| # Samplers # {#samplers} | ||
|
|
||
|
|
@@ -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=]. | ||
|
|
@@ -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]]}} | ||
|
|
@@ -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 | ||
|
kvark marked this conversation as resolved.
|
||
| {{GPUTextureUsage/RENDER_ATTACHMENT}} usage in the core API. | ||
|
|
||
| <table class='data'> | ||
| <thead class=stickyheader> | ||
| <tr> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.