| 3103 | } |
| 3104 | |
| 3105 | static void DrawSetupCompute(VulkanContext* context, VkCommandBuffer vk_command_buffer, ScratchBuffer* scratchBuffer) |
| 3106 | { |
| 3107 | VkDevice vk_device = context->m_LogicalDevice.m_Device; |
| 3108 | VulkanProgram* program_ptr = context->m_CurrentProgram; |
| 3109 | assert(program_ptr->m_ComputeModule); |
| 3110 | |
| 3111 | PrepareScatchBuffer(context, scratchBuffer, program_ptr); |
| 3112 | |
| 3113 | // Write the uniform data to the descriptors |
| 3114 | uint32_t dynamic_alignment = (uint32_t) context->m_PhysicalDevice.m_Properties.limits.minUniformBufferOffsetAlignment; |
| 3115 | VkResult res = CommitUniforms(context, vk_command_buffer, vk_device, program_ptr, VK_PIPELINE_BIND_POINT_COMPUTE, scratchBuffer, context->m_DynamicOffsetBuffer, dynamic_alignment); |
| 3116 | CHECK_VK_ERROR(res); |
| 3117 | |
| 3118 | Pipeline* pipeline = GetOrCreateComputePipeline(vk_device, context->m_VkPipelineCache, context->m_PipelineCache, program_ptr); |
| 3119 | vkCmdBindPipeline(vk_command_buffer, VK_PIPELINE_BIND_POINT_COMPUTE, *pipeline); |
| 3120 | } |
| 3121 | |
| 3122 | static bool DrawSetup(VulkanContext* context, VkCommandBuffer vk_command_buffer, ScratchBuffer* scratchBuffer, DeviceBuffer* indexBuffer, Type indexBufferType) |
| 3123 | { |
no test coverage detected