vulkan: modify descriptor set allocation

Setting the size of each descriptor pool to one
was a hack introduced to make the code work on android.
Changing the code to now allocate all descriptor sets at once
should fix the previous crash.
Not tested yet.
This commit is contained in:
niki
2022-09-09 12:02:30 +02:00
parent 502c1e83ab
commit 9025631231
2 changed files with 32 additions and 24 deletions
+2 -1
View File
@@ -12,6 +12,7 @@
#include <memory>
#include <iostream>
#include <unordered_map>
#include <queue>
namespace love {
@@ -88,7 +89,7 @@ private:
// that gets dynamically increased if more memory is needed
std::vector<std::vector<StreamBuffer*>> streamBuffers;
std::vector<VkDescriptorPool> descriptorPools;
uint32_t currentAllocatedDescriptorSets;
std::queue<VkDescriptorSet> freeDescriptorSets;
std::vector<std::vector<VkDescriptorSet>> descriptorSetsVector;
std::vector<VkPipelineShaderStageCreateInfo> shaderStages;