| 1627 | } |
| 1628 | |
| 1629 | static void WebGPUBeginComputePass(WebGPUContext* context) |
| 1630 | { |
| 1631 | TRACE_CALL; |
| 1632 | if (!context->m_CurrentComputePass.m_Encoder) |
| 1633 | { |
| 1634 | WebGPUEndRenderPass(context); |
| 1635 | WebGPUCreateCommandEncoder(context); |
| 1636 | #if defined(DM_GRAPHICS_WEBGPU2) |
| 1637 | WGPUComputePassDescriptor desc = WGPU_COMPUTE_PASS_DESCRIPTOR_INIT; |
| 1638 | #else |
| 1639 | WGPUComputePassDescriptor desc = {}; |
| 1640 | #endif |
| 1641 | context->m_CurrentComputePass.m_Encoder = wgpuCommandEncoderBeginComputePass(context->m_CommandEncoder, &desc); |
| 1642 | } |
| 1643 | } |
| 1644 | |
| 1645 | static void RenderPassEnd(WebGPUContext* context) |
| 1646 | { |
no test coverage detected