Browse Source

vulkan: fix #2032
when using the low level vertexmain and pixelmain entry points
it can happen that there are no local uniforms used.

niki 1 year ago
parent
commit
ca0264e906
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/modules/graphics/vulkan/Shader.cpp

+ 1 - 1
src/modules/graphics/vulkan/Shader.cpp

@@ -229,7 +229,7 @@ void Shader::newFrame()
 		streamBuffers.clear();
 		streamBuffers.clear();
 		streamBuffers.push_back(new StreamBuffer(vgfx, BUFFERUSAGE_UNIFORM, newSize));
 		streamBuffers.push_back(new StreamBuffer(vgfx, BUFFERUSAGE_UNIFORM, newSize));
 	}
 	}
-	else
+	else if (streamBuffers.size() == 1)
 		streamBuffers.at(0)->nextFrame();
 		streamBuffers.at(0)->nextFrame();
 
 
 	for (VkDescriptorPool pool : descriptorPools[currentFrame])
 	for (VkDescriptorPool pool : descriptorPools[currentFrame])