summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2016-01-16 19:59:23 +0100
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2016-01-18 11:39:24 +0000
commitfd6cf5c875d794d23e513c8e7d6ebabc91dae790 (patch)
tree322ec97f6ea0c0e8f9c1cc89a384769ce0b678a8 /src
parentbc81a28554a256563e7df8860d17f10a63e45a2b (diff)
Avoid checking the fb status in every bind
On some drivers (e.g. NVIDIA, tested on Windows) the status check is apparently expensive. A simple FBO test app rendering into the FBO on every frame (and thus calling bind()) shows a 19-21% CPU usage. With the patch this gets reduced to 0.8-1%. The check is fairly useless too - whenever creating attachments, the status is checked, so d->valid is up-to-date. Task-number: QTBUG-50496 Change-Id: Ie9f0db34e5c2bc1a1141c734ca0b318419013c0d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/opengl/qopenglframebufferobject.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp
index e0ef7c52a5..5184283a31 100644
--- a/src/gui/opengl/qopenglframebufferobject.cpp
+++ b/src/gui/opengl/qopenglframebufferobject.cpp
@@ -1077,8 +1077,6 @@ bool QOpenGLFramebufferObject::bind()
}
}
- d->valid = d->checkFramebufferStatus(current);
-
return d->valid;
}