diff --git a/src/gui/rhi/qrhi.cpp b/src/gui/rhi/qrhi.cpp index 927de859dd..334fa1064a 100644 --- a/src/gui/rhi/qrhi.cpp +++ b/src/gui/rhi/qrhi.cpp @@ -2575,7 +2575,7 @@ QRhiShaderResourceBinding QRhiShaderResourceBinding::uniformBuffer( { QRhiShaderResourceBinding b; QRhiShaderResourceBindingPrivate *d = QRhiShaderResourceBindingPrivate::get(&b); - Q_ASSERT(d->ref.load() == 1); + Q_ASSERT(d->ref.loadRelaxed() == 1); d->binding = binding; d->stage = stage; d->type = UniformBuffer; @@ -2639,7 +2639,7 @@ QRhiShaderResourceBinding QRhiShaderResourceBinding::sampledTexture( { QRhiShaderResourceBinding b; QRhiShaderResourceBindingPrivate *d = QRhiShaderResourceBindingPrivate::get(&b); - Q_ASSERT(d->ref.load() == 1); + Q_ASSERT(d->ref.loadRelaxed() == 1); d->binding = binding; d->stage = stage; d->type = SampledTexture; @@ -2661,7 +2661,7 @@ QRhiShaderResourceBinding QRhiShaderResourceBinding::imageLoad( { QRhiShaderResourceBinding b; QRhiShaderResourceBindingPrivate *d = QRhiShaderResourceBindingPrivate::get(&b); - Q_ASSERT(d->ref.load() == 1); + Q_ASSERT(d->ref.loadRelaxed() == 1); d->binding = binding; d->stage = stage; d->type = ImageLoad; @@ -2715,7 +2715,7 @@ QRhiShaderResourceBinding QRhiShaderResourceBinding::bufferLoad( { QRhiShaderResourceBinding b; QRhiShaderResourceBindingPrivate *d = QRhiShaderResourceBindingPrivate::get(&b); - Q_ASSERT(d->ref.load() == 1); + Q_ASSERT(d->ref.loadRelaxed() == 1); d->binding = binding; d->stage = stage; d->type = BufferLoad; diff --git a/src/gui/rhi/qshader.cpp b/src/gui/rhi/qshader.cpp index 4676ec3f5b..9098180f69 100644 --- a/src/gui/rhi/qshader.cpp +++ b/src/gui/rhi/qshader.cpp @@ -389,7 +389,7 @@ QShader QShader::fromSerialized(const QByteArray &data) QShader bs; QShaderPrivate *d = QShaderPrivate::get(&bs); - Q_ASSERT(d->ref.load() == 1); // must be detached + Q_ASSERT(d->ref.loadRelaxed() == 1); // must be detached int intVal; ds >> intVal; if (intVal != QSB_VERSION)