Changed BindVertexBuffers to use single instance
(To work around GLES impl using 0)
Changed command submission to use PipelineStage: eFragmentShader
Added DeviceWaitIdle() to SwapBuffers() (now called from PostRender)
Ensured SwapBuffers() is called to change swapchain index.
Change-Id: I6c53e369c60969fb920d097bece73dea4b7da0f1
BindResources(set);
}
}
+ if(instanceCount == 0)
+ {
+ instanceCount = 1;
+ }
mCommandBuffer.draw(vertexCount, instanceCount, firstVertex, firstInstance);
}
}
}
// draw here
+ if(instanceCount == 0)
+ {
+ instanceCount = 1;
+ }
mCommandBuffer.drawIndexed(indexCount,
instanceCount,
firstIndex,
mGraphicsDevice.Submit(*mQueue,
{Vulkan::SubmissionData{
{swapchainBuffer->acquireNextImageSemaphore},
- {},
+ {vk::PipelineStageFlagBits::eFragmentShader},
{commandBuffer},
{swapchainBuffer->submitSemaphore}}},
swapchainBuffer->endOfFrameFence.get());
uint32_t Device::SwapBuffers()
{
+ DeviceWaitIdle();
mCurrentBufferIndex = (mCurrentBufferIndex + 1) & 1;
return mCurrentBufferIndex;
}
void VulkanGraphics::PostRender()
{
+ mGraphicsDevice.SwapBuffers();
}
void VulkanGraphics::Shutdown()