diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2021-03-16 16:33:27 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2021-03-19 10:46:23 +0000 |
commit | 19384f2e8f50bad0a0775f7b2e10aff3372bcbb5 (patch) | |
tree | dbf1589023f98726177a7a92dcc20a46778589ff /src/gui/rhi/qrhimetal.mm | |
parent | 969337bcfd6af6d91b988e4b412703274a0b5877 (diff) |
rhi: Make it possible to clone a QRhiRenderPassDescriptor
Pick-to: 6.1
Task-number: QTBUG-91888
Change-Id: Ib6d2e639e6c24f3e9a733c6563dc8a6d6da47719
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhimetal.mm')
-rw-r--r-- | src/gui/rhi/qrhimetal.mm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/rhi/qrhimetal.mm b/src/gui/rhi/qrhimetal.mm index a736dd511e..ddbd0ea740 100644 --- a/src/gui/rhi/qrhimetal.mm +++ b/src/gui/rhi/qrhimetal.mm @@ -2900,6 +2900,16 @@ bool QMetalRenderPassDescriptor::isCompatible(const QRhiRenderPassDescriptor *ot return true; } +QRhiRenderPassDescriptor *QMetalRenderPassDescriptor::newCompatibleRenderPassDescriptor() const +{ + QMetalRenderPassDescriptor *rp = new QMetalRenderPassDescriptor(m_rhi); + rp->colorAttachmentCount = colorAttachmentCount; + rp->hasDepthStencil = hasDepthStencil; + memcpy(rp->colorFormat, colorFormat, sizeof(colorFormat)); + rp->dsFormat = dsFormat; + return rp; +} + QMetalReferenceRenderTarget::QMetalReferenceRenderTarget(QRhiImplementation *rhi) : QRhiRenderTarget(rhi), d(new QMetalRenderTargetData) |