From 6aca3813c4ccc496c0f9b2db293acb546aa11d2d Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 1 Nov 2023 21:42:12 -0700 Subject: Parameter binding and gfx fixes. (#3302) * Parameter binding and gfx fixes. * Add diagnostics on entry point parameters. * Fix. --------- Co-authored-by: Yong He --- tools/gfx/vulkan/vk-command-encoder.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'tools/gfx/vulkan/vk-command-encoder.cpp') diff --git a/tools/gfx/vulkan/vk-command-encoder.cpp b/tools/gfx/vulkan/vk-command-encoder.cpp index ddb48833f..78d8a751f 100644 --- a/tools/gfx/vulkan/vk-command-encoder.cpp +++ b/tools/gfx/vulkan/vk-command-encoder.cpp @@ -130,12 +130,8 @@ Result PipelineCommandEncoder::bindRootShaderObjectImpl(VkPipelineBindPoint bind // by the specialized program layout. // List descriptorSetsStorage; - auto descriptorSetCount = specializedLayout->getTotalDescriptorSetCount(); - descriptorSetsStorage.setCount(descriptorSetCount); - auto descriptorSets = descriptorSetsStorage.getBuffer(); - - context.descriptorSets = descriptorSets; + context.descriptorSets = &descriptorSetsStorage; // We kick off recursive binding of shader objects to the pipeline (plus // the state in `context`). @@ -151,15 +147,15 @@ Result PipelineCommandEncoder::bindRootShaderObjectImpl(VkPipelineBindPoint bind // Once we've filled in all the descriptor sets, we bind them // to the pipeline at once. // - if (descriptorSetCount > 0) + if (descriptorSetsStorage.getCount() > 0) { m_device->m_api.vkCmdBindDescriptorSets( m_commandBuffer->m_commandBuffer, bindPoint, specializedLayout->m_pipelineLayout, 0, - (uint32_t)descriptorSetCount, - descriptorSets, + (uint32_t)descriptorSetsStorage.getCount(), + descriptorSetsStorage.getBuffer(), 0, nullptr); } -- cgit v1.2.3