|
|
@ -519,17 +519,12 @@ void GraphicsPipeline::ConfigureDraw(const RescalingPushConstant& rescaling, |
|
|
// allocate/bind descriptor set and only update if needed
|
|
|
// allocate/bind descriptor set and only update if needed
|
|
|
VkDescriptorSet descriptor_set = VK_NULL_HANDLE; |
|
|
VkDescriptorSet descriptor_set = VK_NULL_HANDLE; |
|
|
bool needs_update = false; |
|
|
bool needs_update = false; |
|
|
if (descriptor_set_layout) { |
|
|
|
|
|
if (uses_push_descriptor) { |
|
|
|
|
|
// handled below via push descriptor
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
if (descriptor_set_layout && !uses_push_descriptor) { |
|
|
descriptor_set = descriptor_allocator.CommitWithTracking(current_frame_number, descriptor_data); |
|
|
descriptor_set = descriptor_allocator.CommitWithTracking(current_frame_number, descriptor_data); |
|
|
needs_update = descriptor_allocator.NeedsUpdate(descriptor_set, current_frame_number, descriptor_data); |
|
|
needs_update = descriptor_allocator.NeedsUpdate(descriptor_set, current_frame_number, descriptor_data); |
|
|
if (needs_update) { |
|
|
if (needs_update) { |
|
|
const vk::Device& dev{device.GetLogical()}; |
|
|
const vk::Device& dev{device.GetLogical()}; |
|
|
dev.UpdateDescriptorSet(descriptor_set, *descriptor_update_template, descriptor_data); |
|
|
dev.UpdateDescriptorSet(descriptor_set, *descriptor_update_template, descriptor_data); |
|
|
} else { |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|