vulkan: remove dep on VK_KHR_push_descriptor

It's not sure if this extension is supported everywhere
This commit uses normal descriptor pools, sets and writes,
which are all availabel in base vulkan.
This commit is contained in:
niki
2022-08-19 16:44:59 +02:00
parent f4ece69307
commit be8778b4eb
6 changed files with 104 additions and 39 deletions
+7 -3
View File
@@ -70,8 +70,9 @@ private:
size_t baseoff,
const std::string& basename);
VkDescriptorSet allocateDescriptorSet();
VkDeviceSize uniformBufferSizeAligned;
PFN_vkCmdPushDescriptorSetKHR vkCmdPushDescriptorSet;
VkDescriptorSetLayout descriptorSetLayout;
VkPipelineLayout pipelineLayout;
@@ -80,6 +81,9 @@ private:
// we keep a vector of stream buffers per frame in flight
// that gets dynamically increased if more memory is needed
std::vector<std::vector<StreamBuffer*>> streamBuffers;
std::vector<VkDescriptorPool> descriptorPools;
uint32_t currentAllocatedDescriptorSets;
std::vector<std::vector<VkDescriptorSet>> descriptorSetsVector;
std::vector<VkPipelineShaderStageCreateInfo> shaderStages;
std::vector<VkShaderModule> shaderModules;
@@ -94,8 +98,8 @@ private:
size_t builtinUniformDataOffset;
uint32_t currentFrame;
// todo: give this variable a better name
uint32_t count;
uint32_t currentUsedUniformStreamBuffersCount;
uint32_t currentUsedDescriptorSetsCount;
};
}
}