summaryrefslogtreecommitdiffstats
path: root/tools/gfx/vulkan/vk-command-encoder.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-11-01 21:42:12 -0700
committerGitHub <noreply@github.com>2023-11-01 21:42:12 -0700
commit6aca3813c4ccc496c0f9b2db293acb546aa11d2d (patch)
tree5281f0ac62946787db90409c1ab3da5ed3f0fc5c /tools/gfx/vulkan/vk-command-encoder.cpp
parent532c4322c9d9ab2c95a5bb573c89062456b59236 (diff)
Parameter binding and gfx fixes. (#3302)
* Parameter binding and gfx fixes. * Add diagnostics on entry point parameters. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tools/gfx/vulkan/vk-command-encoder.cpp')
-rw-r--r--tools/gfx/vulkan/vk-command-encoder.cpp12
1 files changed, 4 insertions, 8 deletions
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<VkDescriptorSet> 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);
}