diff options
Diffstat (limited to 'src/gui/rhi')
-rw-r--r-- | src/gui/rhi/qrhi.cpp | 16 | ||||
-rw-r--r-- | src/gui/rhi/qrhi_p.h | 18 | ||||
-rw-r--r-- | src/gui/rhi/qshader.cpp | 4 | ||||
-rw-r--r-- | src/gui/rhi/qshader_p.h | 6 |
4 files changed, 22 insertions, 22 deletions
diff --git a/src/gui/rhi/qrhi.cpp b/src/gui/rhi/qrhi.cpp index 868ce62da2..7d2af37e96 100644 --- a/src/gui/rhi/qrhi.cpp +++ b/src/gui/rhi/qrhi.cpp @@ -711,7 +711,7 @@ bool operator!=(const QRhiDepthStencilClearValue &a, const QRhiDepthStencilClear \relates QRhiDepthStencilClearValue */ -uint qHash(const QRhiDepthStencilClearValue &v, uint seed) Q_DECL_NOTHROW +size_t qHash(const QRhiDepthStencilClearValue &v, size_t seed) Q_DECL_NOTHROW { return seed * (uint(qFloor(qreal(v.depthClearValue()) * 100)) + v.stencilClearValue()); } @@ -807,7 +807,7 @@ bool operator!=(const QRhiViewport &a, const QRhiViewport &b) Q_DECL_NOTHROW \relates QRhiViewport */ -uint qHash(const QRhiViewport &v, uint seed) Q_DECL_NOTHROW +size_t qHash(const QRhiViewport &v, size_t seed) Q_DECL_NOTHROW { const std::array<float, 4> r = v.viewport(); return seed + uint(r[0]) + uint(r[1]) + uint(r[2]) + uint(r[3]) @@ -898,7 +898,7 @@ bool operator!=(const QRhiScissor &a, const QRhiScissor &b) Q_DECL_NOTHROW \relates QRhiScissor */ -uint qHash(const QRhiScissor &v, uint seed) Q_DECL_NOTHROW +size_t qHash(const QRhiScissor &v, size_t seed) Q_DECL_NOTHROW { const std::array<int, 4> r = v.scissor(); return seed + uint(r[0]) + uint(r[1]) + uint(r[2]) + uint(r[3]); @@ -1032,7 +1032,7 @@ bool operator!=(const QRhiVertexInputBinding &a, const QRhiVertexInputBinding &b \relates QRhiVertexInputBinding */ -uint qHash(const QRhiVertexInputBinding &v, uint seed) Q_DECL_NOTHROW +size_t qHash(const QRhiVertexInputBinding &v, size_t seed) Q_DECL_NOTHROW { return seed + v.stride() + v.classification(); } @@ -1185,7 +1185,7 @@ bool operator!=(const QRhiVertexInputAttribute &a, const QRhiVertexInputAttribut \relates QRhiVertexInputAttribute */ -uint qHash(const QRhiVertexInputAttribute &v, uint seed) Q_DECL_NOTHROW +size_t qHash(const QRhiVertexInputAttribute &v, size_t seed) Q_DECL_NOTHROW { return seed + uint(v.binding()) + uint(v.location()) + uint(v.format()) + v.offset(); } @@ -1246,7 +1246,7 @@ bool operator!=(const QRhiVertexInputLayout &a, const QRhiVertexInputLayout &b) \relates QRhiVertexInputLayout */ -uint qHash(const QRhiVertexInputLayout &v, uint seed) Q_DECL_NOTHROW +size_t qHash(const QRhiVertexInputLayout &v, size_t seed) Q_DECL_NOTHROW { return qHash(v.m_bindings, seed) + qHash(v.m_attributes, seed); } @@ -1336,7 +1336,7 @@ bool operator!=(const QRhiShaderStage &a, const QRhiShaderStage &b) Q_DECL_NOTHR \relates QRhiShaderStage */ -uint qHash(const QRhiShaderStage &v, uint seed) Q_DECL_NOTHROW +size_t qHash(const QRhiShaderStage &v, size_t seed) Q_DECL_NOTHROW { return v.type() + qHash(v.shader(), seed) + v.shaderVariant(); } @@ -3182,7 +3182,7 @@ bool operator!=(const QRhiShaderResourceBinding &a, const QRhiShaderResourceBind \relates QRhiShaderResourceBinding */ -uint qHash(const QRhiShaderResourceBinding &b, uint seed) Q_DECL_NOTHROW +size_t qHash(const QRhiShaderResourceBinding &b, size_t seed) Q_DECL_NOTHROW { const QRhiShaderResourceBinding::Data *d = b.data(); return seed + uint(d->binding) + 10 * uint(d->stage) + 100 * uint(d->type) diff --git a/src/gui/rhi/qrhi_p.h b/src/gui/rhi/qrhi_p.h index 9d906d7bbd..5c4cf4a144 100644 --- a/src/gui/rhi/qrhi_p.h +++ b/src/gui/rhi/qrhi_p.h @@ -94,7 +94,7 @@ Q_DECLARE_TYPEINFO(QRhiDepthStencilClearValue, Q_MOVABLE_TYPE); Q_GUI_EXPORT bool operator==(const QRhiDepthStencilClearValue &a, const QRhiDepthStencilClearValue &b) Q_DECL_NOTHROW; Q_GUI_EXPORT bool operator!=(const QRhiDepthStencilClearValue &a, const QRhiDepthStencilClearValue &b) Q_DECL_NOTHROW; -Q_GUI_EXPORT uint qHash(const QRhiDepthStencilClearValue &v, uint seed = 0) Q_DECL_NOTHROW; +Q_GUI_EXPORT size_t qHash(const QRhiDepthStencilClearValue &v, size_t seed = 0) Q_DECL_NOTHROW; #ifndef QT_NO_DEBUG_STREAM Q_GUI_EXPORT QDebug operator<<(QDebug, const QRhiDepthStencilClearValue &); #endif @@ -126,7 +126,7 @@ Q_DECLARE_TYPEINFO(QRhiViewport, Q_MOVABLE_TYPE); Q_GUI_EXPORT bool operator==(const QRhiViewport &a, const QRhiViewport &b) Q_DECL_NOTHROW; Q_GUI_EXPORT bool operator!=(const QRhiViewport &a, const QRhiViewport &b) Q_DECL_NOTHROW; -Q_GUI_EXPORT uint qHash(const QRhiViewport &v, uint seed = 0) Q_DECL_NOTHROW; +Q_GUI_EXPORT size_t qHash(const QRhiViewport &v, size_t seed = 0) Q_DECL_NOTHROW; #ifndef QT_NO_DEBUG_STREAM Q_GUI_EXPORT QDebug operator<<(QDebug, const QRhiViewport &); #endif @@ -150,7 +150,7 @@ Q_DECLARE_TYPEINFO(QRhiScissor, Q_MOVABLE_TYPE); Q_GUI_EXPORT bool operator==(const QRhiScissor &a, const QRhiScissor &b) Q_DECL_NOTHROW; Q_GUI_EXPORT bool operator!=(const QRhiScissor &a, const QRhiScissor &b) Q_DECL_NOTHROW; -Q_GUI_EXPORT uint qHash(const QRhiScissor &v, uint seed = 0) Q_DECL_NOTHROW; +Q_GUI_EXPORT size_t qHash(const QRhiScissor &v, size_t seed = 0) Q_DECL_NOTHROW; #ifndef QT_NO_DEBUG_STREAM Q_GUI_EXPORT QDebug operator<<(QDebug, const QRhiScissor &); #endif @@ -185,7 +185,7 @@ Q_DECLARE_TYPEINFO(QRhiVertexInputBinding, Q_MOVABLE_TYPE); Q_GUI_EXPORT bool operator==(const QRhiVertexInputBinding &a, const QRhiVertexInputBinding &b) Q_DECL_NOTHROW; Q_GUI_EXPORT bool operator!=(const QRhiVertexInputBinding &a, const QRhiVertexInputBinding &b) Q_DECL_NOTHROW; -Q_GUI_EXPORT uint qHash(const QRhiVertexInputBinding &v, uint seed = 0) Q_DECL_NOTHROW; +Q_GUI_EXPORT size_t qHash(const QRhiVertexInputBinding &v, size_t seed = 0) Q_DECL_NOTHROW; #ifndef QT_NO_DEBUG_STREAM Q_GUI_EXPORT QDebug operator<<(QDebug, const QRhiVertexInputBinding &); #endif @@ -229,7 +229,7 @@ Q_DECLARE_TYPEINFO(QRhiVertexInputAttribute, Q_MOVABLE_TYPE); Q_GUI_EXPORT bool operator==(const QRhiVertexInputAttribute &a, const QRhiVertexInputAttribute &b) Q_DECL_NOTHROW; Q_GUI_EXPORT bool operator!=(const QRhiVertexInputAttribute &a, const QRhiVertexInputAttribute &b) Q_DECL_NOTHROW; -Q_GUI_EXPORT uint qHash(const QRhiVertexInputAttribute &v, uint seed = 0) Q_DECL_NOTHROW; +Q_GUI_EXPORT size_t qHash(const QRhiVertexInputAttribute &v, size_t seed = 0) Q_DECL_NOTHROW; #ifndef QT_NO_DEBUG_STREAM Q_GUI_EXPORT QDebug operator<<(QDebug, const QRhiVertexInputAttribute &); #endif @@ -265,7 +265,7 @@ private: QVarLengthArray<QRhiVertexInputAttribute, 8> m_attributes; friend Q_GUI_EXPORT bool operator==(const QRhiVertexInputLayout &a, const QRhiVertexInputLayout &b) Q_DECL_NOTHROW; - friend Q_GUI_EXPORT uint qHash(const QRhiVertexInputLayout &v, uint seed) Q_DECL_NOTHROW; + friend Q_GUI_EXPORT size_t qHash(const QRhiVertexInputLayout &v, size_t seed) Q_DECL_NOTHROW; friend Q_GUI_EXPORT QDebug operator<<(QDebug, const QRhiVertexInputLayout &); }; @@ -273,7 +273,7 @@ Q_DECLARE_TYPEINFO(QRhiVertexInputLayout, Q_MOVABLE_TYPE); Q_GUI_EXPORT bool operator==(const QRhiVertexInputLayout &a, const QRhiVertexInputLayout &b) Q_DECL_NOTHROW; Q_GUI_EXPORT bool operator!=(const QRhiVertexInputLayout &a, const QRhiVertexInputLayout &b) Q_DECL_NOTHROW; -Q_GUI_EXPORT uint qHash(const QRhiVertexInputLayout &v, uint seed = 0) Q_DECL_NOTHROW; +Q_GUI_EXPORT size_t qHash(const QRhiVertexInputLayout &v, size_t seed = 0) Q_DECL_NOTHROW; #ifndef QT_NO_DEBUG_STREAM Q_GUI_EXPORT QDebug operator<<(QDebug, const QRhiVertexInputLayout &); #endif @@ -310,7 +310,7 @@ Q_DECLARE_TYPEINFO(QRhiShaderStage, Q_MOVABLE_TYPE); Q_GUI_EXPORT bool operator==(const QRhiShaderStage &a, const QRhiShaderStage &b) Q_DECL_NOTHROW; Q_GUI_EXPORT bool operator!=(const QRhiShaderStage &a, const QRhiShaderStage &b) Q_DECL_NOTHROW; -Q_GUI_EXPORT uint qHash(const QRhiShaderStage &s, uint seed = 0) Q_DECL_NOTHROW; +Q_GUI_EXPORT size_t qHash(const QRhiShaderStage &s, size_t seed = 0) Q_DECL_NOTHROW; #ifndef QT_NO_DEBUG_STREAM Q_GUI_EXPORT QDebug operator<<(QDebug, const QRhiShaderStage &); #endif @@ -411,7 +411,7 @@ Q_DECLARE_TYPEINFO(QRhiShaderResourceBinding, Q_MOVABLE_TYPE); Q_GUI_EXPORT bool operator==(const QRhiShaderResourceBinding &a, const QRhiShaderResourceBinding &b) Q_DECL_NOTHROW; Q_GUI_EXPORT bool operator!=(const QRhiShaderResourceBinding &a, const QRhiShaderResourceBinding &b) Q_DECL_NOTHROW; -Q_GUI_EXPORT uint qHash(const QRhiShaderResourceBinding &b, uint seed = 0) Q_DECL_NOTHROW; +Q_GUI_EXPORT size_t qHash(const QRhiShaderResourceBinding &b, size_t seed = 0) Q_DECL_NOTHROW; #ifndef QT_NO_DEBUG_STREAM Q_GUI_EXPORT QDebug operator<<(QDebug, const QRhiShaderResourceBinding &); #endif diff --git a/src/gui/rhi/qshader.cpp b/src/gui/rhi/qshader.cpp index 945f4820c2..83d62fc4eb 100644 --- a/src/gui/rhi/qshader.cpp +++ b/src/gui/rhi/qshader.cpp @@ -543,7 +543,7 @@ bool operator==(const QShader &lhs, const QShader &rhs) Q_DECL_NOTHROW \relates QShader */ -uint qHash(const QShader &s, uint seed) Q_DECL_NOTHROW +size_t qHash(const QShader &s, size_t seed) Q_DECL_NOTHROW { uint h = s.stage(); for (auto it = s.d->shaders.constBegin(), itEnd = s.d->shaders.constEnd(); it != itEnd; ++it) @@ -596,7 +596,7 @@ bool operator==(const QShaderKey &lhs, const QShaderKey &rhs) Q_DECL_NOTHROW \relates QShaderKey */ -uint qHash(const QShaderKey &k, uint seed) Q_DECL_NOTHROW +size_t qHash(const QShaderKey &k, size_t seed) Q_DECL_NOTHROW { return seed + 10 * k.source() + k.sourceVersion().version() + k.sourceVersion().flags() + k.sourceVariant(); } diff --git a/src/gui/rhi/qshader_p.h b/src/gui/rhi/qshader_p.h index 4b561b6fa9..f2d3c4ac2f 100644 --- a/src/gui/rhi/qshader_p.h +++ b/src/gui/rhi/qshader_p.h @@ -158,7 +158,7 @@ private: QShaderPrivate *d; friend struct QShaderPrivate; friend Q_GUI_EXPORT bool operator==(const QShader &, const QShader &) Q_DECL_NOTHROW; - friend Q_GUI_EXPORT uint qHash(const QShader &, uint) Q_DECL_NOTHROW; + friend Q_GUI_EXPORT size_t qHash(const QShader &, size_t) Q_DECL_NOTHROW; #ifndef QT_NO_DEBUG_STREAM friend Q_GUI_EXPORT QDebug operator<<(QDebug, const QShader &); #endif @@ -190,7 +190,7 @@ private: Q_DECLARE_TYPEINFO(QShaderKey, Q_MOVABLE_TYPE); Q_GUI_EXPORT bool operator==(const QShader &lhs, const QShader &rhs) Q_DECL_NOTHROW; -Q_GUI_EXPORT uint qHash(const QShader &s, uint seed = 0) Q_DECL_NOTHROW; +Q_GUI_EXPORT size_t qHash(const QShader &s, size_t seed = 0) Q_DECL_NOTHROW; inline bool operator!=(const QShader &lhs, const QShader &rhs) Q_DECL_NOTHROW { @@ -216,7 +216,7 @@ inline bool operator!=(const QShaderCode &lhs, const QShaderCode &rhs) Q_DECL_NO return !(lhs == rhs); } -Q_GUI_EXPORT uint qHash(const QShaderKey &k, uint seed = 0) Q_DECL_NOTHROW; +Q_GUI_EXPORT size_t qHash(const QShaderKey &k, size_t seed = 0) Q_DECL_NOTHROW; #ifndef QT_NO_DEBUG_STREAM Q_GUI_EXPORT QDebug operator<<(QDebug, const QShader &); |