aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/scenegraph
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2016-05-06 12:48:04 +0200
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2016-05-08 20:03:33 +0000
commit76c7f7b10f309b05d83114669f7c9aa116bcbd9a (patch)
treef6bcc3bca4c7627afd6ea97e1bb442d39498b60c /src/plugins/scenegraph
parent57a61dc907fb132351bbbf2782a73feb0ce93b30 (diff)
D3D12: Fix a buffer sync issue and fix up tst_scenegraph
the manyWindows test passes now which is excellent. Complex render / bug fix tests are skipped for now due to them doing GL specific stuff no reasonable to investigate for now. createTextureFromImage() gets its scenegraph-valid condition fixed as well. Change-Id: Ie72da127e7f219f3c3d024e9f896d1617d06ab85 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/plugins/scenegraph')
-rw-r--r--src/plugins/scenegraph/d3d12/qsgd3d12engine.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/scenegraph/d3d12/qsgd3d12engine.cpp b/src/plugins/scenegraph/d3d12/qsgd3d12engine.cpp
index 1abc529835..7e0518896e 100644
--- a/src/plugins/scenegraph/d3d12/qsgd3d12engine.cpp
+++ b/src/plugins/scenegraph/d3d12/qsgd3d12engine.cpp
@@ -1197,7 +1197,7 @@ void QSGD3D12EnginePrivate::beginFrame()
b.d[currentPFrameIndex].dirty.clear();
}
- if (frameIndex >= frameInFlightCount) {
+ if (frameIndex >= frameInFlightCount - 1) {
// Now sync the buffer changes from the previous, potentially still in
// flight, frames. This is done by taking the ranges dirtied in those
// frames and adding them to the global CPU-side buffer's dirty list,
@@ -1225,7 +1225,9 @@ void QSGD3D12EnginePrivate::beginFrame()
}
}
}
+ }
+ if (frameIndex >= frameInFlightCount) {
// Do some texture upload bookkeeping.
const quint64 finishedFrameIndex = frameIndex - frameInFlightCount; // we know since we just blocked for this
// pfd conveniently refers to the same slot that was used by that frame