diff options
Diffstat (limited to 'src/gui/rhi/qshader.cpp')
-rw-r--r-- | src/gui/rhi/qshader.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/rhi/qshader.cpp b/src/gui/rhi/qshader.cpp index 1992708ba4..7fc327c5c3 100644 --- a/src/gui/rhi/qshader.cpp +++ b/src/gui/rhi/qshader.cpp @@ -335,7 +335,7 @@ QByteArray QShader::serialized() const ds << QShaderPrivate::QSB_VERSION; ds << int(d->stage); d->desc.serialize(&ds); - ds << int(d->shaders.count()); + ds << int(d->shaders.size()); for (auto it = d->shaders.cbegin(), itEnd = d->shaders.cend(); it != itEnd; ++it) { const QShaderKey &k(it.key()); writeShaderKey(&ds, k); @@ -343,24 +343,24 @@ QByteArray QShader::serialized() const ds << shader.shader(); ds << shader.entryPoint(); } - ds << int(d->bindings.count()); + ds << int(d->bindings.size()); for (auto it = d->bindings.cbegin(), itEnd = d->bindings.cend(); it != itEnd; ++it) { const QShaderKey &k(it.key()); writeShaderKey(&ds, k); const NativeResourceBindingMap &map(it.value()); - ds << int(map.count()); + ds << int(map.size()); for (auto mapIt = map.cbegin(), mapItEnd = map.cend(); mapIt != mapItEnd; ++mapIt) { ds << mapIt.key(); ds << mapIt.value().first; ds << mapIt.value().second; } } - ds << int(d->combinedImageMap.count()); + ds << int(d->combinedImageMap.size()); for (auto it = d->combinedImageMap.cbegin(), itEnd = d->combinedImageMap.cend(); it != itEnd; ++it) { const QShaderKey &k(it.key()); writeShaderKey(&ds, k); const SeparateToCombinedImageSamplerMappingList &list(it.value()); - ds << int(list.count()); + ds << int(list.size()); for (auto listIt = list.cbegin(), listItEnd = list.cend(); listIt != listItEnd; ++listIt) { ds << listIt->combinedSamplerName; ds << listIt->textureBinding; @@ -516,8 +516,8 @@ QShaderKey::QShaderKey(QShader::Source s, bool operator==(const QShader &lhs, const QShader &rhs) noexcept { return lhs.d->stage == rhs.d->stage - && lhs.d->shaders == rhs.d->shaders; - // do not bother with desc and bindings, if the shader code is the same, the description must match too + && lhs.d->shaders == rhs.d->shaders + && lhs.d->bindings == rhs.d->bindings; } /*! |