Add algorithm for GPUTexture.createView()#1406
Merged
toji merged 1 commit intogpuweb:mainfrom Feb 3, 2021
Merged
Conversation
kvark
approved these changes
Feb 3, 2021
kainino0x
reviewed
Feb 3, 2021
Contributor
kainino0x
left a comment
There was a problem hiding this comment.
Sorry for the delay, here are some comments for a followup :)
| - If |this|.{{GPUTexture/[[dimension]]}} is | ||
| <dl class="switch"> | ||
| : {{GPUTextureDimension/"1d"}} | ||
| :: Let |arrayCount| be |this|.{{GPUTexture/[[textureSize]]}}.[=Extent3D/depth=]. |
Contributor
There was a problem hiding this comment.
nit: This is a little misleading since we don't have 1d-array textures. If this were encapsulated in an algorithm (see below) then I would explicitly call out that texture.textureSize.depth is expected to be 1.
kainino0x
reviewed
Feb 4, 2021
| set |resolved|.{{GPUTextureViewDescriptor/dimension}} to {{GPUTextureViewDimension/"1d"}}. | ||
| - If |texture|.{{GPUTexture/[[dimension]]}} is {{GPUTextureDimension/"2d"}}: | ||
| - If |texture|.{{GPUTexture/[[textureSize]]}}.[=Extent3D/depth=] is greater than `1` | ||
| and |resolved|.{{GPUTextureViewDescriptor/arrayLayerCount}} is greater than `1`, |
Contributor
There was a problem hiding this comment.
Found another thing while reviewing a CTS change.
The meaning here has changed from the original (before this PR), though that was outdated because it special-cased 0. I think this should be refactored to say:
- If texture.dimension is 2d:
- If texture.textureSize.depth is 1 or (the original, pre-defaulting) arrayLayerCount is defined, view dimension is 2d.
- else view dimension is 2d-array.
Pretty sure that's the original intent. Though it's kind of weird? Maybe it should have been:
- If texture.dimension is 2d:
- If texture.textureSize.depth is 1 or (the original, pre-defaulting) arrayLayerCount is 1, view dimension is 2d.
- else view dimension is 2d-array.
ben-clayton
pushed a commit
to ben-clayton/gpuweb
that referenced
this pull request
Sep 6, 2022
This PR adds unimplemented tests for the `textureNumSamples` builtin. Issue gpuweb#1265
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #1397
Preview | Diff