RHI: Don't retain texture operations after frame is done

Retaining texture upload commands comes at a price, because it
means we also retain the backing storage, which could e.g. be
fullscreen buffers for applications on Wayland. These would
eventually be overwritten, but just clearing the array between
frames is also fine because the data is never reused and the
array is a QVarLengthArray anyway so it already has a lot of
reserved space.

Pick-to: 6.2
Change-Id: I7389487be67b671830787e30e1468c303b7ac5c2
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
Eskil Abrahamsen Blomfeldt 2021-10-08 14:40:58 +02:00
parent 95fd21a26a
commit 6f0d7eb92e

View File

@ -5537,6 +5537,8 @@ void QRhiResourceUpdateBatchPrivate::free()
const quint64 mask = 1ULL << quint64(poolIndex);
rhi->resUpdPoolMap &= ~mask;
poolIndex = -1;
textureOps.clear();
}
void QRhiResourceUpdateBatchPrivate::merge(QRhiResourceUpdateBatchPrivate *other)