You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AllocTemporary elision. If a small temporary allocation is exclusively used within a single fused kernel, that allocation should be skipped, and it should be replaced with a global variable inside the compute shader. Implementing this might be kind of ugly because the binding-to-global remapping happens at fused kernel construction time.
should avoid leaving gaps in the binding layout
There's some really awful type-punning going on while translating naga::Statement::Emit during kernel fusion. Worse, it's not even guaranteed to be correct -- the process of expression remapping may turn a contiguous range into multiple disjoint ranges if we're not careful. It might be best to just halt kernel fusion if we encounter Emit.
Fused kernels aren't added to the FFI interface due to mutability restrictions. This caused the signatures of codegen functions to change; they now take references to GPU shader modules rather than external function IDs. I'm not sure whether this is a good or bad change...
Shaders must now have unique names.
GpuKernel should store the actual Naga shader datastructure (in a newtyped wrapper, of course). Storing it as a string causes a bunch of redundant serialization/deserialization. The main challenge with this approach is serializing/deserializing from RON, where we want the shader's string contents. I think this can be addressed with custom serialization logic in the newtyped wrapper.
It would be nice to have a better way of showing what kernel fusion actually does. Right now, you have to look at the generated Rust code to understand what it does.
FuseState::finish is just really ugly. It should probably be rewritten from scratch.
The text was updated successfully, but these errors were encountered:
AllocTemporary
elision. If a small temporary allocation is exclusively used within a single fused kernel, that allocation should be skipped, and it should be replaced with a global variable inside the compute shader. Implementing this might be kind of ugly because the binding-to-global remapping happens at fused kernel construction time.naga::Statement::Emit
during kernel fusion. Worse, it's not even guaranteed to be correct -- the process of expression remapping may turn a contiguous range into multiple disjoint ranges if we're not careful. It might be best to just halt kernel fusion if we encounterEmit
.GpuKernel
should store the actual Naga shader datastructure (in a newtyped wrapper, of course). Storing it as a string causes a bunch of redundant serialization/deserialization. The main challenge with this approach is serializing/deserializing from RON, where we want the shader's string contents. I think this can be addressed with custom serialization logic in the newtyped wrapper.FuseState::finish
is just really ugly. It should probably be rewritten from scratch.The text was updated successfully, but these errors were encountered: