diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2017-03-28 16:22:56 -0600 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2017-03-29 11:58:08 -0600 |
| commit | b62e26e00e6db3de1607c41cd757d309f3c58d13 (patch) | |
| tree | 8a42f99a6b1b3bd1532c46bab7fb7c31d9a3feda /layers/unique_objects.cpp | |
| parent | ee3ba1acdc5f2555cf0483e37d2a07c693484642 (diff) | |
| download | usermoji-b62e26e00e6db3de1607c41cd757d309f3c58d13.tar.xz | |
layers: Fix push_desc_with_template in unique_objs
Added unwrapping of vulkan objects embedded in this APIs data buffer.
Change-Id: Ibbee614148d10efe9a954cd793f0e92881300c71
Diffstat (limited to 'layers/unique_objects.cpp')
| -rw-r--r-- | layers/unique_objects.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/layers/unique_objects.cpp b/layers/unique_objects.cpp index 4d7722ba..64acf43d 100644 --- a/layers/unique_objects.cpp +++ b/layers/unique_objects.cpp @@ -802,14 +802,16 @@ VKAPI_ATTR void VKAPI_CALL CmdPushDescriptorSetWithTemplateKHR(VkCommandBuffer c VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void *pData) { layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map); + uint64_t template_handle = reinterpret_cast<uint64_t &>(descriptorUpdateTemplate); { std::lock_guard<std::mutex> lock(global_lock); - descriptorUpdateTemplate = - (VkDescriptorUpdateTemplateKHR)dev_data->unique_id_mapping[reinterpret_cast<uint64_t &>(descriptorUpdateTemplate)]; + descriptorUpdateTemplate = (VkDescriptorUpdateTemplateKHR)dev_data->unique_id_mapping[template_handle]; layout = (VkPipelineLayout)dev_data->unique_id_mapping[reinterpret_cast<uint64_t &>(layout)]; } + void *unwrapped_buffer = BuildUnwrappedUpdateTemplateBuffer(dev_data, template_handle, pData); dev_data->device_dispatch_table->CmdPushDescriptorSetWithTemplateKHR(commandBuffer, descriptorUpdateTemplate, layout, set, - pData); + unwrapped_buffer); + free(unwrapped_buffer); } #ifndef __ANDROID__ |
