Add support for rendering to slices of 3D texture views and single layered 2D-Array texture views#7596
Merged
teoxoy merged 12 commits intogfx-rs:trunkfrom Apr 25, 2025
Merged
Conversation
83150ec to
9d359d2
Compare
This comment was marked as resolved.
This comment was marked as resolved.
6c55332 to
85cae1d
Compare
85cae1d to
7e2ad3b
Compare
ErichDonGubler
approved these changes
Apr 24, 2025
Member
ErichDonGubler
left a comment
There was a problem hiding this comment.
LGTM! I have a bunch of minor stuff I wrote, but overall: 💯
…ed as render attachments
…xture views from slices of 3D textures)
7e2ad3b to
68d665b
Compare
Imageless framebuffers are not needed, we know which views will be attached to the render pass already. Even if we wanted to more aggressively cache imageless framebuffers that wouldn't be possible since they still require specifiying view usage, texture usage and view formats. Removing usage of imageless framebuffers simplifies the code substantially.
This makes texture view destruction cheap since users of wgpu-hal are required to keep resources referenced by encoders alive for at least as long as the encoder is alive. This is also a prerequisite to implement rendering to slices of 3D textures (by creating temporary texture views). On the other hand the cache won't be as effective but that is probably ok, we can reevaluate the implementation if it turns out to be a problem.
If fields are unused, they shouldn't be part of the cache key.
68d665b to
c75940a
Compare
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.
Connections
Resolves #7313
Resolves #6040
Resolves #4764
Description
Note:
Vulkan implementation is not part of this PR, I will open a follow-up for that since it's more complicated due to the backend caching framebuffers.Testing
Added tests.
Squash or Rebase?
Rebase