-
Notifications
You must be signed in to change notification settings - Fork 308
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
Add GPUTextureDescriptor.viewFormats #811
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spec text you're adding doesn't match the title of the PR. The PR title talks about
GPUTextureDescriptor.viewformats
but here you're adding the sequence of formats to theGPUTexture
object itself.For D3D12, you need to tell the API that you want a typeless texture at object creation time. So specifying something like
viewFormats
would be best as part of the descriptor as the title of the PR states.The best place to look at the mapping for compatible formats for D3D can be found in the format tables for the various feature levels. https://microsoft.github.io/DirectX-Specs/d3d/archive/images/d3d11/D3D11_3_Formats_FL11_1.xls is a link to the one for FL11_1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The section you commented on contains the "internal slots" for the texture. It saves creation arguments so they can be later used by other parts of the spec for validation. The real API change is [1] which adds
viewFormats
to theGPUTextureDescriptor
.Thanks for the link, [lease help build the compatibility classes for WebGPU in #744
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, Corentin. I admit I overlooked the viewFormats section.
I think we should go forward with this PR and amend the spec pending the outcome of #774 about which ones are allowed to go together.