diff --git a/projects/voxelization/src/main.cpp b/projects/voxelization/src/main.cpp index d9d9aedcc5a32552b83e2d9fe48733410ec2f9c7..9a6492b80febb61e38ee3a90f29921d5ca7ed9ba 100644 --- a/projects/voxelization/src/main.cpp +++ b/projects/voxelization/src/main.cpp @@ -29,6 +29,8 @@ int main(int argc, const char** argv) { features.setGeometryShader(true); features.setDepthClamp(true); features.setShaderInt16(true); + features.setFragmentStoresAndAtomics(true); + features.setVertexPipelineStoresAndAtomics(true); }); features.requireExtensionFeature<vk::PhysicalDeviceDescriptorIndexingFeatures>( diff --git a/src/vkcv/DescriptorSetManager.cpp b/src/vkcv/DescriptorSetManager.cpp index 2b71e527e279b8cb4a63ada1b088e76ad981c0a4..4a3d4f5bbc1a785d4977ede468172ef7c5a54af1 100644 --- a/src/vkcv/DescriptorSetManager.cpp +++ b/src/vkcv/DescriptorSetManager.cpp @@ -20,15 +20,17 @@ namespace vkcv { * Allocate the set size for the descriptor pools, namely 1000 units of each descriptor type * below. Finally, create an initial pool. */ - m_PoolSizes = { - vk::DescriptorPoolSize(vk::DescriptorType::eSampler, 1000), - vk::DescriptorPoolSize(vk::DescriptorType::eSampledImage, 1000), - vk::DescriptorPoolSize(vk::DescriptorType::eUniformBuffer, 1000), - vk::DescriptorPoolSize(vk::DescriptorType::eStorageBuffer, 1000), - vk::DescriptorPoolSize(vk::DescriptorType::eUniformBufferDynamic, 1000), - vk::DescriptorPoolSize(vk::DescriptorType::eStorageBufferDynamic, 1000), - vk::DescriptorPoolSize(vk::DescriptorType::eAccelerationStructureKHR, 1000) - }; + m_PoolSizes.clear(); + m_PoolSizes.emplace_back(vk::DescriptorType::eSampler, 1000); + m_PoolSizes.emplace_back(vk::DescriptorType::eSampledImage, 1000); + m_PoolSizes.emplace_back(vk::DescriptorType::eUniformBuffer, 1000); + m_PoolSizes.emplace_back(vk::DescriptorType::eStorageBuffer, 1000); + m_PoolSizes.emplace_back(vk::DescriptorType::eUniformBufferDynamic, 1000); + m_PoolSizes.emplace_back(vk::DescriptorType::eStorageBufferDynamic, 1000); + + if (core.getContext().getFeatureManager().isExtensionActive(VK_KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME)) { + m_PoolSizes.emplace_back(vk::DescriptorType::eAccelerationStructureKHR, 1000); + } m_PoolInfo = vk::DescriptorPoolCreateInfo( vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet, 1000,