diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2021-09-15 13:28:44 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2021-09-16 22:58:17 +0200 |
commit | 43a42fa19693d8ee1a52a5723aa026ee1ccd5de2 (patch) | |
tree | d936b77ba8c110cfb8dd8261c1997203aa2df612 /src/gui/rhi/qrhigles2.cpp | |
parent | c5a3cabce0f9fd615a77772002d6e1b5ca121919 (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/qrhigles2.cpp')
-rw-r--r-- | src/gui/rhi/qrhigles2.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/rhi/qrhigles2.cpp b/src/gui/rhi/qrhigles2.cpp index 31b4d8cd51..04ad9d83dd 100644 --- a/src/gui/rhi/qrhigles2.cpp +++ b/src/gui/rhi/qrhigles2.cpp @@ -4769,6 +4769,11 @@ QRhiRenderPassDescriptor *QGles2RenderPassDescriptor::newCompatibleRenderPassDes return new QGles2RenderPassDescriptor(m_rhi); } +QVector<quint32> QGles2RenderPassDescriptor::serializedFormat() const +{ + return {}; +} + QGles2ReferenceRenderTarget::QGles2ReferenceRenderTarget(QRhiImplementation *rhi) : QRhiRenderTarget(rhi), d(rhi) |