fix case where no workgroups are dispatched

main
cosmonaut 2022-01-27 21:12:44 -08:00
parent b00dc11fea
commit bed612a848
1 changed files with 1 additions and 1 deletions

View File

@ -148,7 +148,7 @@ namespace MoonWorksComputeSpriteBatch
{
VertexCount = VertexCount
});
commandBuffer.DispatchCompute(VertexCount / 256, 1, 1, offset);
commandBuffer.DispatchCompute(System.Math.Max(1, VertexCount / 256), 1, 1, offset);
commandBuffer.BeginRenderPass(renderPass, framebuffer, renderArea, Vector4.Zero);
commandBuffer.BindGraphicsPipeline(graphicsPipeline);