summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi/qrhi_p.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2021-09-15 13:28:44 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2021-09-16 22:58:17 +0200
commit43a42fa19693d8ee1a52a5723aa026ee1ccd5de2 (patch)
treed936b77ba8c110cfb8dd8261c1997203aa2df612 /src/gui/rhi/qrhi_p.h
parentc5a3cabce0f9fd615a77772002d6e1b5ca121919 (diff)
rhi: Allow testing renderpass compatibility without the objects
Follow what has been done for QRhiShaderResourceBindings. Have a way to retrieve an opaque blob (that just happens to be a list of integers) so that a simple == comparison can be used to determine compatibility even when the objects from which the blob was retrieved are no longer alive. The contract is the following: bool a = rp1->isCompatible(rp2); bool b = rp1->serializedFormat() == rp2->serializedFormat(); assert(a == b); Pick-to: 6.2 Change-Id: I45e7d05eeb6dfa2b2de474da0a0644912aaf174a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhi_p.h')
-rw-r--r--src/gui/rhi/qrhi_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/rhi/qrhi_p.h b/src/gui/rhi/qrhi_p.h
index d31838f52f..acd04f299c 100644
--- a/src/gui/rhi/qrhi_p.h
+++ b/src/gui/rhi/qrhi_p.h
@@ -993,6 +993,8 @@ public:
virtual QRhiRenderPassDescriptor *newCompatibleRenderPassDescriptor() const = 0;
+ virtual QVector<quint32> serializedFormat() const = 0;
+
protected:
QRhiRenderPassDescriptor(QRhiImplementation *rhi);
};