summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2016-02-13 14:07:14 +0000
committerSean Harmer <sean.harmer@kdab.com>2016-02-14 18:13:38 +0000
commit48ca7f6220df4b1dc62fda905d5f8ae0b6e6e41c (patch)
treee4c721bbb60c8503746c9cf0d5e1915cbc0e66af /configure
parent10742cf8949497b83b87133ed66ec119cb3ab08f (diff)
Provide optimised version of QOpenGLFramebufferObject::blitFramebuffer
Profiling shows that the call to glGetIntegerv() in this function that queries for the currently bound framebuffer is very expensive. It's the top hit on the CPU when profiling a Qt3D application using a Scene3D Qt Quick 2 item. The reason it is so expensive is that this call forces the OpenGL driver to propagate the OpenGL state through all of the queued commands in order to answer the query. It may also induce a pipeline stall depending upon the driver implementation. As this function gets called on the hot path every frame whenever using a Scene3D item and may also be called in plain Qt Quick when using ShaderEffect items; the layer property of QQuickItem; or when updating the Qt Quick glyph cache texture on Core profile contexts, it is very much worthy of optimization. This commit adds an overload of the blitFramebuffer() call that allows the caller to provide a policy that can either: * keep the existing behavior of restoring the previous framebuffer binding, * restore the default framebuffer, or * don't restore anything and let the caller be responsible for it. This will allow consumers such as Qt Quick and Qt 3D to use the optimised code path. The existing overloads of blitFramebuffer() retain the current behavior by calling with the policy to restore the previous framebuffer binding. Upon making this change, the cost of blitFramebuffer() is massively reduced. A follow up commit will optimize this further. Change-Id: I417abb7da916ae5088f6817e4eff8ea02c8c5803 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'configure')
0 files changed, 0 insertions, 0 deletions