Replies: 1 comment
-
Makes sense 👍 Passing everything to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We recently outlined and partially implemented the
root.unwrap(resource)
API. Its purpose was to peer underneath TypeGPU and get access to the underlying WebGPU resource associated with that TypeGPU resource.Examples:
root.unwrap(resource: TgpuBuffer<AnyTgpuData>): GPUBuffer
root.unwrap(resource: TgpuBindGroupLayout): GPUBindGroupLayout
root.unwrap(resource: TgpuBindGroup): GPUBindGroup
When we want to also add the functionality to turn typed functions into the code they represent, along with all their dependencies,
.unwrap
seemed like the ideal candidate. This however posed some problems:root.unwrap
returns a string, not a WebGPU resource. We could return a shader module instead, but that limits its usability in migration workflows.Proposed solution
Beta Was this translation helpful? Give feedback.
All reactions