aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/coreapi/qsgshaderrewriter.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@sletta.org>2015-01-06 08:40:21 +0100
committerGunnar Sletta <gunnar@sletta.org>2015-01-06 17:18:27 +0100
commita371bac3fba73f92aaa63a68d8ab1ae81a1d1031 (patch)
tree63b9b03a6a833a7cd7e2b421e3be275587156223 /src/quick/scenegraph/coreapi/qsgshaderrewriter.cpp
parentba455b8e1cbd3c892670cbd8b11278edfef7355d (diff)
Reuse the memory we use for vertex uploads.
Every batch would have its own buffer with its own memory and the original idea was that it would stabilize so that the same batch would be used over and over, so the memory allocatd for each batch's buffer would be reused. In practice batches get discarded and recycled in somewhat arbitrary order so we always end up reallocating. Instead, use a single buffer for all uploads. This saves us several reallocations per frame, and also prevents pooling of several potentially large allocated blocks inside the renderer. The exception is when using visualization or for drivers which have broken index buffer support (nouveau only currently), where we keep the existing behavior as the buffer data is needed during rendering and visualization. Change-Id: Id29095e00128ec1ee6d4ac3caa8f2c17cc7bbd27 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Diffstat (limited to 'src/quick/scenegraph/coreapi/qsgshaderrewriter.cpp')
0 files changed, 0 insertions, 0 deletions