From f9bf67af85728f5207b02a3f99d950af83020bc3 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Mon, 4 Mar 2013 20:20:15 -0600 Subject: [PATCH] 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 --- src/quick/items/qquickshadereffectsource.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/quick/items/qquickshadereffectsource.cpp b/src/quick/items/qquickshadereffectsource.cpp index bdfef7c..cab3692 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(); } -- 2.7.4