aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@live.com>2013-03-04 20:20:15 -0600
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-12 12:42:49 +0100
commitf9bf67af85728f5207b02a3f99d950af83020bc3 (patch)
tree8f1b22096398330dfc910fdf339e257dc4cedf13 /src/quick
parent74878ba417e7db9fe8f68a55d69a3cc7ee804422 (diff)
Introduce QML_FBO_FLUSH_BEFORE_DETACH to work around FBO issue.
On some AMD hardware, detaching the depth attachment immediately after rendering to an FBO will cause rendering issues. Adding an explicit glFlush before detaching seems to work around the issue. Task-number: QTBUG-29265 Change-Id: I97c7b87c1c3d3a69a4d6228dd9459745710c5f4c Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/quick')
-rw-r--r--src/quick/items/qquickshadereffectsource.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/quick/items/qquickshadereffectsource.cpp b/src/quick/items/qquickshadereffectsource.cpp
index bdfef7ca88..cab3692f5a 100644
--- a/src/quick/items/qquickshadereffectsource.cpp
+++ b/src/quick/items/qquickshadereffectsource.cpp
@@ -53,6 +53,7 @@
QT_BEGIN_NAMESPACE
DEFINE_BOOL_CONFIG_OPTION(qmlFboOverlay, QML_FBO_OVERLAY)
+DEFINE_BOOL_CONFIG_OPTION(qmlFboFlushBeforeDetach, QML_FBO_FLUSH_BEFORE_DETACH)
namespace
{
@@ -75,6 +76,8 @@ namespace
BindableFbo::~BindableFbo()
{
+ if (qmlFboFlushBeforeDetach())
+ glFlush();
if (m_depthStencil)
m_depthStencil->detach();
}