Proper image layout for descriptor image infos (instead of always GENERAL), code cleanup, comments

This commit is contained in:
saschawillems 2017-01-04 21:49:26 +01:00
parent 5485e77d30
commit 251560845c
4 changed files with 25 additions and 20 deletions

View file

@ -489,11 +489,11 @@ public:
VK_CHECK_RESULT(vkAllocateDescriptorSets(device, &allocInfo, &descriptorSet));
// Image descriptor for the texture array
VkDescriptorImageInfo texArrayDescriptor =
VkDescriptorImageInfo textureDescriptor =
vkTools::initializers::descriptorImageInfo(
textureArray.sampler,
textureArray.view,
VK_IMAGE_LAYOUT_GENERAL);
textureArray.imageLayout);
std::vector<VkWriteDescriptorSet> writeDescriptorSets =
{
@ -508,7 +508,7 @@ public:
descriptorSet,
VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
1,
&texArrayDescriptor)
&textureDescriptor)
};
vkUpdateDescriptorSets(device, writeDescriptorSets.size(), writeDescriptorSets.data(), 0, NULL);