* @brief Represents handles + metadata for a reusable kernel on the GPU. * The struct members can be divided into "consumed upon dispatch" * (commandBuffer) and reusable ahead-of-time setup (all other members). */
| 453 | * (commandBuffer) and reusable ahead-of-time setup (all other members). |
| 454 | */ |
| 455 | struct Kernel { |
| 456 | std::unique_ptr<WGPUBuffer[]> buffers; // non-owning |
| 457 | std::unique_ptr<size_t[]> bufferSizes; |
| 458 | size_t numBindings; |
| 459 | Shape totalWorkgroups; |
| 460 | WGPUBindGroup bindGroup; // persists between submission |
| 461 | WGPUComputePipeline computePipeline; // persists between submission |
| 462 | WGPUCommandBuffer commandBuffer; // destroyed upon submission |
| 463 | }; |
| 464 | |
| 465 | |
| 466 | /** |
nothing calls this directly
no outgoing calls
no test coverage detected