diff --git a/src/gui/rhi/qrhi.cpp b/src/gui/rhi/qrhi.cpp index 521ea92d942..5a6bdc9e31c 100644 --- a/src/gui/rhi/qrhi.cpp +++ b/src/gui/rhi/qrhi.cpp @@ -9439,8 +9439,8 @@ void QRhiResourceUpdateBatchPrivate::merge(QRhiResourceUpdateBatchPrivate *other bool QRhiResourceUpdateBatchPrivate::hasOptimalCapacity() const { - return activeBufferOpCount < BUFFER_OPS_STATIC_ALLOC - 16 - && activeTextureOpCount < TEXTURE_OPS_STATIC_ALLOC - 16; + return activeBufferOpCount < BUFFER_OPS_STATIC_ALLOC - 4 + && activeTextureOpCount < TEXTURE_OPS_STATIC_ALLOC - 4; } void QRhiResourceUpdateBatchPrivate::trimOpLists() diff --git a/src/gui/rhi/qrhi_p.h b/src/gui/rhi/qrhi_p.h index fc3da12f787..68e3533053b 100644 --- a/src/gui/rhi/qrhi_p.h +++ b/src/gui/rhi/qrhi_p.h @@ -527,11 +527,11 @@ public: }; int activeBufferOpCount = 0; // this is the real number of used elements in bufferOps, not bufferOps.count() - static const int BUFFER_OPS_STATIC_ALLOC = 1024; + static const int BUFFER_OPS_STATIC_ALLOC = 64; QVarLengthArray bufferOps; int activeTextureOpCount = 0; // this is the real number of used elements in textureOps, not textureOps.count() - static const int TEXTURE_OPS_STATIC_ALLOC = 256; + static const int TEXTURE_OPS_STATIC_ALLOC = 32; QVarLengthArray textureOps; QRhiResourceUpdateBatch *q = nullptr;