RHI: Fix deprecation warnings about QAtomicInteger::load()
Replace by loadRelaxed(), fixing: rhi\qrhi.cpp: In static member function 'static QRhiShaderResourceBinding QRhiShaderResourceBinding::uniformBuffer(int, QRhiShaderResourceBinding::StageFlags, QRhiBuffer*)': rhi\qrhi.cpp:2578:26: warning: 'T QBasicAtomicInteger<T>::load() const [with T = int]' is deprecated: Use loadRelaxed [-Wdeprecated-declarations] Q_ASSERT(d->ref.load() == 1); Change-Id: Iebe9a62d20498e67bde34b2f0cab8cc38682154f Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This commit is contained in:
parent
3ccbf19761
commit
e65ea36018
@ -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;
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user