| 304 | // <- |
| 305 | |
| 306 | void RenderSystem::dispatchComputeCall(Dod::Ref p_ComputeCall, |
| 307 | VkCommandBuffer p_CommandBuffer) |
| 308 | { |
| 309 | PipelineRef pipelineRef = ComputeCallManager::_descPipeline(p_ComputeCall); |
| 310 | PipelineLayoutRef pipelineLayoutRef = |
| 311 | PipelineManager::_descPipelineLayout(pipelineRef); |
| 312 | const glm::uvec3& dimensions = |
| 313 | ComputeCallManager::_descDimensions(p_ComputeCall); |
| 314 | |
| 315 | VkPipeline newPipeline = PipelineManager::_vkPipeline(pipelineRef); |
| 316 | vkCmdBindPipeline(p_CommandBuffer, VK_PIPELINE_BIND_POINT_COMPUTE, |
| 317 | newPipeline); |
| 318 | |
| 319 | if (ComputeCallManager::_vkDescriptorSet(p_ComputeCall)) |
| 320 | { |
| 321 | vkCmdBindDescriptorSets( |
| 322 | p_CommandBuffer, VK_PIPELINE_BIND_POINT_COMPUTE, |
| 323 | PipelineLayoutManager::_vkPipelineLayout(pipelineLayoutRef), 0u, 1u, |
| 324 | &ComputeCallManager::_vkDescriptorSet(p_ComputeCall), |
| 325 | (uint32_t)ComputeCallManager::_dynamicOffsets(p_ComputeCall).size(), |
| 326 | ComputeCallManager::_dynamicOffsets(p_ComputeCall).data()); |
| 327 | } |
| 328 | |
| 329 | vkCmdDispatch(p_CommandBuffer, (uint32_t)dimensions.x, (uint32_t)dimensions.y, |
| 330 | (uint32_t)dimensions.z); |
| 331 | } |
| 332 | |
| 333 | // <- |
| 334 | |