mirror of
https://github.com/EmbarkStudios/rust-gpu.git
synced 2024-11-22 06:45:13 +00:00
parent
e8aef14347
commit
e261b88a73
@ -163,7 +163,7 @@ fn main(inputs: &ShadingInputs, indirect_lighting: &IndirectLighting) {
|
||||
|
||||
# Suggestion
|
||||
|
||||
I think the most ergonomic and future proof binding method would be to have descriptors in structs, bound to the entrypoint. This allows us some nice, even more ergonomic upsides later on (when support is more widely available) where we can put data members in these structs as well. And along wit this, we can have very egonomic CPU side code as well, where we can keep shader invocation looking like a function call for a large part, instead of having to manually bind to slots again.
|
||||
I think the most ergonomic and future proof binding method would be to have descriptors in structs, bound to the entrypoint. This allows us some nice, even more ergonomic upsides later on (when support is more widely available) where we can put data members in these structs as well. And along with this, we can have very egonomic CPU side code as well, where we can keep shader invocation looking like a function call for a large part, instead of having to manually bind to slots again.
|
||||
|
||||
# Prior art
|
||||
|
||||
@ -238,4 +238,4 @@ RLSL also passes resource bindings as arguments to the kernel, with two template
|
||||
#[spirv(compute)]
|
||||
fn compute(compute: Compute, buffer: Buffer<N0, N0, RuntimeArray<f32>>)
|
||||
```
|
||||
</details>
|
||||
</details>
|
||||
|
Loading…
Reference in New Issue
Block a user