summaryrefslogtreecommitdiffstats
path: root/tests/manual
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual')
-rw-r--r--tests/manual/rhi/shared/examplefw.h3
-rw-r--r--tests/manual/rhi/triquadcube/triquadcube.cpp5
2 files changed, 7 insertions, 1 deletions
diff --git a/tests/manual/rhi/shared/examplefw.h b/tests/manual/rhi/shared/examplefw.h
index 450aa172c2..1a29ef5f7e 100644
--- a/tests/manual/rhi/shared/examplefw.h
+++ b/tests/manual/rhi/shared/examplefw.h
@@ -124,6 +124,7 @@ QString graphicsApiName()
QRhi::Flags rhiFlags = QRhi::EnableDebugMarkers;
int sampleCount = 1;
QRhiSwapChain::Flags scFlags = 0;
+QRhi::BeginFrameFlags beginFrameFlags = 0;
QRhi::EndFrameFlags endFrameFlags = 0;
class Window : public QWindow
@@ -375,7 +376,7 @@ void Window::render()
// GPU/present, and that's what throttles the thread to the refresh rate.
// (except for OpenGL where it happens either in endFrame or somewhere else
// depending on the GL implementation)
- QRhi::FrameOpResult r = m_r->beginFrame(m_sc);
+ QRhi::FrameOpResult r = m_r->beginFrame(m_sc, beginFrameFlags);
if (r == QRhi::FrameOpSwapChainOutOfDate) {
resizeSwapChain();
if (!m_hasSwapChain)
diff --git a/tests/manual/rhi/triquadcube/triquadcube.cpp b/tests/manual/rhi/triquadcube/triquadcube.cpp
index 4165e96127..76dbe558ab 100644
--- a/tests/manual/rhi/triquadcube/triquadcube.cpp
+++ b/tests/manual/rhi/triquadcube/triquadcube.cpp
@@ -71,6 +71,7 @@
//#define READBACK_SWAPCHAIN
//#define NO_VSYNC
//#define USE_MIN_SWAPCHAIN_BUFFERS
+//#define DECLARE_EXT_CONTENTS
struct {
TriangleRenderer triRenderer;
@@ -118,6 +119,10 @@ void preInit()
scFlags |= QRhiSwapChain::MinimalBufferCount;
#endif
+#ifdef DECLARE_EXT_CONTENTS
+ beginFrameFlags |= QRhi::ExternalContentsInPass;
+#endif
+
// For OpenGL some of these are incorporated into the QSurfaceFormat by
// examplefw.h after returning from here as that is out of the RHI's control.
}