Browse Source

vulkan: fix shader:send(texture|buffer) not calling love.graphics.flushBatch.

Sasha Szpakowski 1 year ago
parent
commit
8dae72b88e
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/modules/graphics/vulkan/Shader.cpp

+ 6 - 0
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;