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>
commit76a13b7cf7bdea2344b65f775226a22a17fa78c6
parent0731f8b336a6792e344dfefad8b7e9c79afac2d2
authorPaul Lemire <paul.lemire@kdab.com>
committerPaul Lemire <paul.lemire@kdab.com>
commit timeFri, 18 Sep 2020 14:33:39 +0200