rhi: Reduce prealloc for some internal VLAs in resource update batches
Change-Id: If95ed36401e03b44648ef1b41701c8d522c1ce99 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 502114ba99dca60f1511f3d74487312fe370336b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
44ae4e183e
commit
00d3afe4ff
@ -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()
|
||||
|
@ -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<BufferOp, BUFFER_OPS_STATIC_ALLOC> 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<TextureOp, TEXTURE_OPS_STATIC_ALLOC> textureOps;
|
||||
|
||||
QRhiResourceUpdateBatch *q = nullptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user