-
Notifications
You must be signed in to change notification settings - Fork 543
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
Burn the batch context with fire #751
Comments
I guess then gfx-rs would be unopinionated about how to share a resource. How does this work at the moment? I understand that e.g. a mesh is only a handle to a buffer on the GPU. What are its ownership semantics and when does it free the underlying resource? |
@aepsil0n resources are reference-counted now anyway (they were not when Since the mesh just has attributes pointing to GPU buffers, these get logically freed when the mesh goes out of scope (assuming it's the unique holder). The actual release call is done upon |
This sounds good to me. |
Fixed in #757 |
751: Convert Extensions + Capabilities into Features r=kvark a=cwfitzgerald **Connections** Based on upcoming webgpu changes. **Description** Does what it says on the tin. The only notable change was classifying the AnisotropicFiltering extension as a WebGPU extension (per gpuweb/gpuweb#696, but no idea if that's the correct interpretation) **Testing** Will be tested by upcoming wgpu-rs PR. Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
It can be used to save on mesh/program cloning (which have allocations!) when creating lots of batches. However, I'm convinced it brings more trouble than the benefit (#510, #464, #351). Besides, it can just be moved outside of gfx-rs crate.
The problem with the
Context
, outside of it just being another thing to consider or think about, is that it doesn't have a very safe interface. Thus, it could be fine to use inside another library as an implementation detail, but not fine to expose it to the user. I may end up moving it out and using it for gfx_scene, but I'll hesitate to do it until mesh/program cloning shows up in the profiler.Let's burn this thing! We only really need a
Batch
trait and two kinds of batches: one with everything in it (batch::Full
?), and another one with just the core components that have to be bound together (batch::Core
). This is a breaking change supposedly for gfx-0.6Objections? @csherratt @cmr @bjz
The text was updated successfully, but these errors were encountered: