@@ -537,12 +537,9 @@ class CVulkanLogicalDevice final : public ILogicalDevice
537
537
auto * infoDst = const_cast <VkDescriptorBufferInfo*>(vk_writeDescriptorSets[i].pBufferInfo );
538
538
for (uint32_t j = 0 ; j < pDescriptorWrites[i].count ; ++j, ++infoSrc, ++infoDst)
539
539
{
540
- if (infoSrc->info .buffer .size )
541
- {
542
- infoDst->buffer = static_cast <const CVulkanBuffer*>(infoSrc->desc .get ())->getInternalObject ();
543
- infoDst->offset = infoSrc->info .buffer .offset ;
544
- infoDst->range = infoSrc->info .buffer .size ;
545
- }
540
+ infoDst->buffer = static_cast <const CVulkanBuffer*>(infoSrc->desc .get ())->getInternalObject ();
541
+ infoDst->offset = infoSrc->info .buffer .offset ;
542
+ infoDst->range = infoSrc->info .buffer .size ;
546
543
}
547
544
} break ;
548
545
@@ -554,16 +551,13 @@ class CVulkanLogicalDevice final : public ILogicalDevice
554
551
auto * infoDst = const_cast <VkDescriptorImageInfo*>(vk_writeDescriptorSets[i].pImageInfo );
555
552
for (uint32_t j = 0 ; j < pDescriptorWrites[i].count ; ++j, ++infoSrc, ++infoDst)
556
553
{
557
- if (infoSrc->info .image .imageLayout != asset::IImage::E_LAYOUT::EL_UNDEFINED)
558
- {
559
- VkSampler vk_sampler = VK_NULL_HANDLE;
560
- if (infoSrc->info .image .sampler && (infoSrc->info .image .sampler ->getAPIType () == EAT_VULKAN))
561
- vk_sampler = static_cast <const CVulkanSampler*>(infoSrc->info .image .sampler .get ())->getInternalObject ();
562
-
563
- infoDst->sampler = vk_sampler;
564
- infoDst->imageView = static_cast <const CVulkanImageView*>(infoSrc->desc .get ())->getInternalObject ();
565
- infoDst->imageLayout = static_cast <VkImageLayout>(infoSrc->info .image .imageLayout );
566
- }
554
+ VkSampler vk_sampler = VK_NULL_HANDLE;
555
+ if (infoSrc->info .image .sampler && (infoSrc->info .image .sampler ->getAPIType () == EAT_VULKAN))
556
+ vk_sampler = static_cast <const CVulkanSampler*>(infoSrc->info .image .sampler .get ())->getInternalObject ();
557
+
558
+ infoDst->sampler = vk_sampler;
559
+ infoDst->imageView = static_cast <const CVulkanImageView*>(infoSrc->desc .get ())->getInternalObject ();
560
+ infoDst->imageLayout = static_cast <VkImageLayout>(infoSrc->info .image .imageLayout );
567
561
}
568
562
} break ;
569
563
@@ -574,10 +568,7 @@ class CVulkanLogicalDevice final : public ILogicalDevice
574
568
const auto * infoSrc = pDescriptorWrites[i].info ;
575
569
auto * infoDst = const_cast <VkBufferView*>(vk_writeDescriptorSets[i].pTexelBufferView );
576
570
for (uint32_t j = 0u ; j < pDescriptorWrites[i].count ; ++j, ++infoSrc, ++infoDst)
577
- {
578
- if (infoSrc->info .buffer .size )
579
- *infoDst = static_cast <const CVulkanBufferView*>(infoSrc->desc .get ())->getInternalObject ();
580
- }
571
+ *infoDst = static_cast <const CVulkanBufferView*>(infoSrc->desc .get ())->getInternalObject ();
581
572
} break ;
582
573
583
574
case asset::IDescriptor::E_CATEGORY::EC_ACCELERATION_STRUCTURE:
0 commit comments