aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp9
-rw-r--r--src/quick/scenegraph/qsgrenderloop.cpp4
-rw-r--r--src/quick/scenegraph/qsgthreadedrenderloop.cpp4
3 files changed, 10 insertions, 7 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
index 8091ccad5d..636b06dfa0 100644
--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
+++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
@@ -3644,7 +3644,14 @@ void Renderer::prepareRenderPass(RenderPassContext *ctx)
void Renderer::beginRenderPass(RenderPassContext *)
{
- commandBuffer()->beginPass(renderTarget(), m_pstate.clearColor, m_pstate.dsClear);
+ commandBuffer()->beginPass(renderTarget(), m_pstate.clearColor, m_pstate.dsClear, nullptr,
+ // we cannot tell if the application will have
+ // native rendering thrown in to this pass
+ // (QQuickWindow::beginExternalCommands()), so
+ // we have no choice but to set the flag always
+ // (thus triggering using secondary command
+ // buffers with Vulkan)
+ QRhiCommandBuffer::ExternalContent);
if (m_renderPassRecordingCallbacks.start)
m_renderPassRecordingCallbacks.start(m_renderPassRecordingCallbacks.userData);
diff --git a/src/quick/scenegraph/qsgrenderloop.cpp b/src/quick/scenegraph/qsgrenderloop.cpp
index 2924516eaf..ea4f21facb 100644
--- a/src/quick/scenegraph/qsgrenderloop.cpp
+++ b/src/quick/scenegraph/qsgrenderloop.cpp
@@ -649,9 +649,7 @@ void QSGGuiThreadRenderLoop::renderWindow(QQuickWindow *window)
emit window->beforeFrameBegin();
Q_ASSERT(rhi == cd->rhi);
- // ### the flag should only be set when the app requests it, but there's no way to do that right now
- QRhi::BeginFrameFlags frameFlags = QRhi::ExternalContentsInPass;
- QRhi::FrameOpResult frameResult = rhi->beginFrame(cd->swapchain, frameFlags);
+ QRhi::FrameOpResult frameResult = rhi->beginFrame(cd->swapchain);
if (frameResult != QRhi::FrameOpSuccess) {
if (frameResult == QRhi::FrameOpDeviceLost)
handleDeviceLoss();
diff --git a/src/quick/scenegraph/qsgthreadedrenderloop.cpp b/src/quick/scenegraph/qsgthreadedrenderloop.cpp
index fca2cfb5fa..48ae4a9116 100644
--- a/src/quick/scenegraph/qsgthreadedrenderloop.cpp
+++ b/src/quick/scenegraph/qsgthreadedrenderloop.cpp
@@ -704,9 +704,7 @@ void QSGRenderThread::syncAndRender(QImage *grabImage)
emit window->beforeFrameBegin();
Q_ASSERT(rhi == cd->rhi);
- // ### the flag should only be set when the app requests it, but there's no way to do that right now
- QRhi::BeginFrameFlags frameFlags = QRhi::ExternalContentsInPass;
- QRhi::FrameOpResult frameResult = rhi->beginFrame(cd->swapchain, frameFlags);
+ QRhi::FrameOpResult frameResult = rhi->beginFrame(cd->swapchain);
if (frameResult != QRhi::FrameOpSuccess) {
if (frameResult == QRhi::FrameOpDeviceLost)
handleDeviceLoss();