vulkan: fix uniform buffer descriptor

There was a bug where the count of used builtin uniform buffer objects
was not advanced. This caused another problem since vulkan requires
a certain alignment for the buffer. This commit fixes both of those
things.
This commit is contained in:
niki
2022-07-29 21:04:35 +02:00
parent 6d7bd645fc
commit 7a3e9ed71e
6 changed files with 49 additions and 20 deletions
+2
View File
@@ -118,6 +118,7 @@ namespace love {
uint32_t getNumImagesInFlight() const;
const PFN_vkCmdPushDescriptorSetKHR getVkCmdPushDescriptorSetKHRFunctionPointer() const;
const VkDeviceSize getMinUniformBufferOffsetAlignment() const;
protected:
graphics::ShaderStage* newShaderStageInternal(ShaderStageType stage, const std::string& cachekey, const std::string& source, bool gles) override {
@@ -189,6 +190,7 @@ namespace love {
std::vector<VkSemaphore> renderFinishedSemaphores;
std::vector<VkFence> inFlightFences;
std::vector<VkFence> imagesInFlight;
VkDeviceSize minUniformBufferOffsetAlignment;
PFN_vkCmdPushDescriptorSetKHR vkCmdPushDescriptorSet;
size_t currentFrame = 0;
uint32_t imageIndex = 0;