summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qfutureinterface.cpp
diff options
context:
space:
mode:
authorAurélien Brooke <aurelien@bahiasoft.fr>2025-02-12 08:47:24 +0100
committerAurélien Brooke <aurelien@bahiasoft.fr>2025-02-13 19:40:34 +0100
commit6ec0fd66324c076b4401351d4a018c6f90022ac7 (patch)
treeb4698323b6cda0e653dbd76317e1c83767c1dcc0 /src/corelib/thread/qfutureinterface.cpp
parentfa21fc298a353d9ddfa31f384196ca6d34067a2c (diff)
rhi: vulkan: avoid allocations/deallocations in every beginPass() call
It is not uncommon to have more than 4 total clear values because of all the color, depth, resolve and shading rate attachments. Set the stack prealloc of the temporary QVarLengthArray to its maximum possible size to avoid any heap (de)allocation in this hot path. For 10 render passes per frame, it saves 600 allocs/deallocs per second. Change-Id: If44fd075d1c1f9c07809ddc9922c690e9dc3ac3d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/corelib/thread/qfutureinterface.cpp')
0 files changed, 0 insertions, 0 deletions