Cleanup descriptor layout handling
This commit is contained in:
@@ -129,10 +129,14 @@ namespace openVulkanoCpp::Vulkan
|
||||
|
||||
void VulkanShader::CreatePipelineLayout()
|
||||
{
|
||||
//vk::PushConstantRange camPushConstantDesc = { vk::ShaderStageFlagBits::eVertex | vk::ShaderStageFlagBits::eFragment, 0, 3 * sizeof(Math::Matrix4f) + sizeof(Math::Vector4f) + 8 * sizeof(float) };
|
||||
//std::array<vk::PushConstantRange, 1> camPushConstantDescs = { camPushConstantDesc };
|
||||
std::array<vk::DescriptorSetLayoutBinding, 1> layoutBindings1 = { reinterpret_cast<const vk::DescriptorSetLayoutBinding&>(NODE_LAYOUT_BINDING) };
|
||||
std::array<vk::DescriptorSetLayoutBinding, 1> layoutBindings2 = { reinterpret_cast<const vk::DescriptorSetLayoutBinding&>(CAM_LAYOUT_BINDING) };
|
||||
if (!descriptorSetLayouts.empty())
|
||||
{
|
||||
for(auto& descriptorSetLayout : descriptorSetLayouts)
|
||||
device.destroyDescriptorSetLayout(descriptorSetLayout);
|
||||
descriptorSetLayouts.clear();
|
||||
}
|
||||
std::array<vk::DescriptorSetLayoutBinding, 1> layoutBindings1 = { reinterpret_cast<const vk::DescriptorSetLayoutBinding&>(Scene::Camera::DESCRIPTOR_SET_LAYOUT_BINDING) };
|
||||
std::array<vk::DescriptorSetLayoutBinding, 1> layoutBindings2 = { reinterpret_cast<const vk::DescriptorSetLayoutBinding&>(Scene::Node::DESCRIPTOR_SET_LAYOUT_BINDING) };
|
||||
descriptorSetLayouts.push_back(device.createDescriptorSetLayout({ {}, layoutBindings1.size(), layoutBindings1.data() }));
|
||||
descriptorSetLayouts.push_back(device.createDescriptorSetLayout({ {}, layoutBindings2.size(), layoutBindings2.data() }));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user