Use combined image descriptor size instead of (wrong) uniform descriptor sizes
Fixes #1091 Fixes #1118
This commit is contained in:
parent
eedfcc6b74
commit
3d641ac5cd
1 changed files with 2 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Vulkan Example - Using descriptor buffers via VK_EXT_descriptor_buffer
|
* Vulkan Example - Using descriptor buffers via VK_EXT_descriptor_buffer
|
||||||
*
|
*
|
||||||
* Copyright (C) 2022-2023 by Sascha Willems - www.saschawillems.de
|
* Copyright (C) 2022-2024 by Sascha Willems - www.saschawillems.de
|
||||||
*
|
*
|
||||||
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
|
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
|
||||||
*/
|
*/
|
||||||
|
|
@ -233,7 +233,7 @@ public:
|
||||||
descriptorInfo.type = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
|
descriptorInfo.type = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
|
||||||
for (uint32_t i = 0; i < static_cast<uint32_t>(cubes.size()); i++) {
|
for (uint32_t i = 0; i < static_cast<uint32_t>(cubes.size()); i++) {
|
||||||
descriptorInfo.data.pCombinedImageSampler = &cubes[i].texture.descriptor;
|
descriptorInfo.data.pCombinedImageSampler = &cubes[i].texture.descriptor;
|
||||||
vkGetDescriptorEXT(device, &descriptorInfo, descriptorBufferProperties.combinedImageSamplerDescriptorSize, imageDescriptorBufPtr + i * uniformDescriptor.layoutSize + uniformDescriptor.layoutOffset);
|
vkGetDescriptorEXT(device, &descriptorInfo, descriptorBufferProperties.combinedImageSamplerDescriptorSize, imageDescriptorBufPtr + i * combinedImageDescriptor.layoutSize + combinedImageDescriptor.layoutOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
// For uniform buffers we only need buffer device addresses
|
// For uniform buffers we only need buffer device addresses
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue