-
Notifications
You must be signed in to change notification settings - Fork 335
[WIP] Read-only GPUTextureView #860
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
Conversation
Thanks for putting this up, it looks much nicer than the previous solution. If I understand correctly, a depth-stencil view would use the following layout:
I think it might be best to allow for future expansion where depth and stencil can independently be readonly. This could be done with |
From meeting: unresolved: want to have benchmarks vs GENERAL layout |
Update: I prototyped a solution suggested in KhronosGroup/Vulkan-Docs#1291 (comment), and it appears to work well. So the current spec has no issues, and we can keep it. Having any kind of benchmarks of image layouts would still be very useful! I also think it's worth keeping this PR open for discussion, albeit at lower priority than before. It's useful because it works better for D3D12. |
Very nice! |
So I suppose we would also still ideally like:
AFAIU we already have the signals in WebGPU that would allow us to use |
Thanks @kvark for raising this issue with on the Vulkan repo. If I understand correctly, there is no longer an issue for implementability on Vulkan because the following would work: For bindgroup creation the
Then for
I don't really have concerns with for D3D12 DSV creation because IMHO there's few enough render passes in a frame that they can be created on demand. So I don't think we need this PR either. (and there's no need for benchmark! woot) |
I think that with the Vulkan issue fixed, this can be closed. We haven't had issue implementing readonly depth-stencil in Dawn either. |
…uweb#860) * Add api,operation,command_buffer,render,state_tracking:* - Part I This patch implements the first part of the operation test api,operation,command_buffer,render,state_tracking:*: - Setting index buffer states multiple times in different orders still keeps the correctness of each draw call. * Small fixes * Rebase to main * Address reviewer's comment
Follow-up to #746 , see investigation in #514 (comment)
Closes #859
This is an alternative fix/evolution of RODS (problem described in #859) that came to mind, and I like it much more. Creating a view could be done by limiting the available usages (through this view) to only read from the texture. This means we no longer need additional
GPURenderPassDescriptor
fields, and we don't need to changeGPUTextureBinding
.Specifying the read-only property at the view creation matches D3D12 API, where the user specifies D3D12_DSV_FLAGS. It also allows the implementation to avoid creating UAVs for viewing textures that support
STORAGE
usage if the user doesn't need to write to the storage (i.e. if they use "readonly-storage-texture" binding).The spec is bare-bones here. I'll be happy to write it down in more detail once/if we agree about the direction here.
Preview | Diff