Commit 3abf8361 authored by Laszlo Agocs's avatar Laszlo Agocs

add threaded multiwindow example skeleton

long way to go
parent 091dec66
......@@ -602,7 +602,6 @@ int main(int argc, char **argv)
QLatin1String("This application tests rendering with the same QRhi instance (and so the same Vulkan/Metal/D3D device or OpenGL context) "
"to multiple windows via multiple QRhiSwapChain objects, from the same one thread. Some resources are shared across all windows."
"\n\nNote that the behavior may differ depending on the underlying graphics API implementation and the number of windows.\n"
"(e.g. weird OpenGL rendering speeds with multiple windows with some drivers is out of Qt's control)"
"\n\nUsing API: ") + graphicsApiName());
This diff is collapsed.
QT += shadertools rhi widgets
RESOURCES = multiwindow_threaded.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/rhi/multiwindow_threaded
INSTALLS += target
<!DOCTYPE RCC><RCC version="1.0">
<file alias="color.vert.qsb">../shared/color.vert.qsb</file>
<file alias="color.frag.qsb">../shared/color.frag.qsb</file>
......@@ -9,6 +9,7 @@ SUBDIRS += \
msaarenderbuffer \
cubemap \
multiwindow \
multiwindow_threaded \
plainqwindow_gles2 \
......@@ -569,10 +569,10 @@ QRhi::FrameOpResult QRhiMetal::beginFrame(QRhiSwapChain *swapChain)
QMetalSwapChain *swapChainD = QRHI_RES(QMetalSwapChain, swapChain);
// This is messed up since for this swapchain we want to wait for the
// This is a bit messed up since for this swapchain we want to wait for the
// commands+present to complete, while for others just for the commands
// (for this same frame slot), just like with Vulkan, but not sure how to
// do that. So wait for everything for now.
// (for this same frame slot) but not sure how to do that in a sane way so
// wait for full cb completion for now.
for (QMetalSwapChain *sc : qAsConst(swapchains)) {
dispatch_semaphore_t sem = sc->d->sem[swapChainD->currentFrame];
dispatch_semaphore_wait(sem, DISPATCH_TIME_FOREVER);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment