Skip to content

Add GPUTextureDescriptor viewFormats list - #2540

Merged
kainino0x merged 2 commits into
gpuweb:mainfrom
kainino0x:viewFormats
Jan 28, 2022
Merged

kainino0x merged 2 commits into
gpuweb:mainfrom
kainino0x:viewFormats

Conversation

@kainino0x

@kainino0x kainino0x commented Jan 26, 2022 •

Copy link
Copy Markdown
Contributor

Initially allows only srgb formats; further rules for format compatibility can follow.

Issue: #168
CC: #2322


Preview | Diff

Initially allows only srgb formats; further rules for format
compatibility can follow.

Issue: gpuweb#168
CC: gpuweb#2322
@kainino0x kainino0x added copyediting Pure editorial stuff (copyediting, *.bs file syntax, etc.) and removed copyediting Pure editorial stuff (copyediting, *.bs file syntax, etc.) labels Jan 26, 2022
@github-actions

Copy link
Copy Markdown
Contributor

Previews, as seen when this build job started (7604d67):
WebGPU | IDL
WGSL
Explainer

@github-actions

Copy link
Copy Markdown
Contributor

Previews, as seen when this build job started (221ae48):
WebGPU | IDL
WGSL
Explainer

Comment thread spec/index.bs
Note: Canvas configuration cannot use `srgb` formats like {{GPUTextureFormat/"bgra8unorm-srgb"}}.
Instead, use the non-`srgb` equivalent ({{GPUTextureFormat/"bgra8unorm"}}), specify the `srgb`
format in the {{GPUCanvasConfiguration/viewFormats}}, and use {{GPUTexture/createView()}} to create
a view with an `srgb` format.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm considering reversing this and adding srgb formats back to the supported context formats so that on older D3D and Vulkan drivers we may be able to avoid enabling reinterpretation (TYPELESS/VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT) just for this common case.
#2537 (reply in thread)

@kainino0x
kainino0x merged commit fbe0832 into gpuweb:main Jan 28, 2022
github-actions Bot added a commit that referenced this pull request Jan 28, 2022
SHA: fbe0832
Reason: push, by @kainino0x

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions Bot added a commit that referenced this pull request Jan 28, 2022
SHA: fbe0832
Reason: push, by @kainino0x

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions Bot added a commit that referenced this pull request Jan 28, 2022
SHA: fbe0832
Reason: push, by @kainino0x

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@kainino0x
kainino0x deleted the viewFormats branch January 29, 2022 04:13
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.

2 participants