RHI renderer: begin frame and submit even if we have no commands
We still need to upload textures/buffers which might be needed later on
even if we have no draw calles to perform.
This fixes the following case:
Frame 1: A buffer is created, no command generated -> buffer
data transfer not performed but still recorded in the RHI command buffer
Frame 2: buffer is reallocated (we orphan, destroy the old rhi buffer and
create a new one with the new size as we cannot resize rhi buffers). This
time, we have commands, so we perform data transfer but in this case, we may
crash as we have since destroyed the RHI buffer from Frame 1, yet we still
have in the command buffer the data transfer command for the old rhi buffer
(we have no way of removing commands once they have been inserted in the
command buffer).
With this patch, the data transfer command would get performed at Frame 1
even if we have nothing to draw, ensuring we have no left over transfer
commands when reaching Frame 2.
Change-Id: I48357633f6c2ee727fb74b4fd81af86e5bad68a6
Reviewed-by: Mike Krus <mike.krus@kdab.com>