From 8dae72b88e9244d8e16a3c0a4aad5b0f46a003d8 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Thu, 7 Mar 2024 23:04:22 -0400 Subject: [PATCH] vulkan: fix shader:send(texture|buffer) not calling love.graphics.flushBatch. --- src/modules/graphics/vulkan/Shader.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modules/graphics/vulkan/Shader.cpp b/src/modules/graphics/vulkan/Shader.cpp index a65e82e70..cff26e4d4 100644 --- a/src/modules/graphics/vulkan/Shader.cpp +++ b/src/modules/graphics/vulkan/Shader.cpp @@ -437,6 +437,9 @@ void Shader::updateUniform(const UniformInfo *info, int count) void Shader::sendTextures(const UniformInfo *info, graphics::Texture **textures, int count) { + if (current == this) + Graphics::flushBatchedDrawsGlobal(); + for (int i = 0; i < count; i++) { int resourceindex = info->resourceIndex + i; @@ -450,6 +453,9 @@ void Shader::sendTextures(const UniformInfo *info, graphics::Texture **textures, void Shader::sendBuffers(const UniformInfo *info, love::graphics::Buffer **buffers, int count) { + if (current == this) + Graphics::flushBatchedDrawsGlobal(); + for (int i = 0; i < count; i++) { int resourceindex = info->resourceIndex + i;