diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2021-09-19 10:50:17 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-09-20 10:59:09 +0000 |
commit | 371e6abb963e12178f58f8356c51d3c82dcd2e60 (patch) | |
tree | f2a11a33525bf058ad7062c1e1b8ac679433e154 /src | |
parent | 2bcf3912fc0fee9d7e71fe3e1addde16c0117f70 (diff) |
rhi: Remove Q_RELOCATABLE_TYPE for types with QVLA in them
QVLA itself is non-relocatable due to self references. (ptr pointing
to array[Prealloc] as long as capacity < Prealloc)
Seems we shot ourselves in the foot in multiple places with this.
Fixes: QTBUG-96619
Change-Id: I57a2ce539b671326cd352dbe57a1f3d4c46a6456
Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
(cherry picked from commit 481bc82d5931d5c715c2e889da6f249aa88057de)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/rhi/qrhi_p.h | 8 | ||||
-rw-r--r-- | src/gui/rhi/qrhi_p_p.h | 3 |
2 files changed, 1 insertions, 10 deletions
diff --git a/src/gui/rhi/qrhi_p.h b/src/gui/rhi/qrhi_p.h index acd04f299c..17b170203b 100644 --- a/src/gui/rhi/qrhi_p.h +++ b/src/gui/rhi/qrhi_p.h @@ -284,8 +284,6 @@ private: friend Q_GUI_EXPORT QDebug operator<<(QDebug, const QRhiVertexInputLayout &); }; -Q_DECLARE_TYPEINFO(QRhiVertexInputLayout, Q_RELOCATABLE_TYPE); - Q_GUI_EXPORT bool operator==(const QRhiVertexInputLayout &a, const QRhiVertexInputLayout &b) noexcept; Q_GUI_EXPORT bool operator!=(const QRhiVertexInputLayout &a, const QRhiVertexInputLayout &b) noexcept; Q_GUI_EXPORT size_t qHash(const QRhiVertexInputLayout &v, size_t seed = 0) noexcept; @@ -526,8 +524,6 @@ private: QRhiTexture *m_depthTexture = nullptr; }; -Q_DECLARE_TYPEINFO(QRhiTextureRenderTargetDescription, Q_RELOCATABLE_TYPE); - class Q_GUI_EXPORT QRhiTextureSubresourceUploadDescription { public: @@ -609,8 +605,6 @@ private: QVarLengthArray<QRhiTextureUploadEntry, 16> m_entries; }; -Q_DECLARE_TYPEINFO(QRhiTextureUploadDescription, Q_RELOCATABLE_TYPE); - class Q_GUI_EXPORT QRhiTextureCopyDescription { public: @@ -1470,7 +1464,7 @@ struct Q_GUI_EXPORT QRhiReadbackResult QRhiTexture::Format format; QSize pixelSize; QByteArray data; -}; // non-movable due to the std::function +}; struct Q_GUI_EXPORT QRhiBufferReadbackResult { diff --git a/src/gui/rhi/qrhi_p_p.h b/src/gui/rhi/qrhi_p_p.h index 89dd7b8e44..0dcb8c1f6e 100644 --- a/src/gui/rhi/qrhi_p_p.h +++ b/src/gui/rhi/qrhi_p_p.h @@ -519,9 +519,6 @@ public: static QRhiResourceUpdateBatchPrivate *get(QRhiResourceUpdateBatch *b) { return b->d; } }; -Q_DECLARE_TYPEINFO(QRhiResourceUpdateBatchPrivate::BufferOp, Q_RELOCATABLE_TYPE); -Q_DECLARE_TYPEINFO(QRhiResourceUpdateBatchPrivate::TextureOp, Q_RELOCATABLE_TYPE); - template<typename T> struct QRhiBatchedBindings { |