summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-06-26 10:36:46 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-06-28 00:24:36 +0200
commite65ea360187bbbf50f844a965faddc392322a0e7 (patch)
treef1251c7dd6dc86fb7adea1b5cca0847342c5287c /src/gui
parent3ccbf19761ec203a88480d25f147cac047a58ee3 (diff)
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>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/rhi/qrhi.cpp8
-rw-r--r--src/gui/rhi/qshader.cpp2
2 files changed, 5 insertions, 5 deletions
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)