summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2024-02-13 14:55:24 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2024-02-14 00:25:55 +0000
commitdcb2186c2a3199d39af09bb81376437b55b907ef (patch)
tree775c08453e7e01ce6b442e776530702002021ceb /tests/auto/gui
parentd588924d11db24efe92a4ba3d77b3d768f460002 (diff)
Fix build with gcc-14
Work-around SiC change made to qfloat16 when using native floats. Pick-to: 6.7 6.6 6.5 Change-Id: I981505e6eff7277ad14512b56fad334be6e79016 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/gui')
-rw-r--r--tests/auto/gui/painting/qcolortransform/tst_qcolortransform.cpp8
-rw-r--r--tests/auto/gui/rhi/qrhi/tst_qrhi.cpp6
2 files changed, 7 insertions, 7 deletions
diff --git a/tests/auto/gui/painting/qcolortransform/tst_qcolortransform.cpp b/tests/auto/gui/painting/qcolortransform/tst_qcolortransform.cpp
index 4d92071c24..7a976b5f5e 100644
--- a/tests/auto/gui/painting/qcolortransform/tst_qcolortransform.cpp
+++ b/tests/auto/gui/painting/qcolortransform/tst_qcolortransform.cpp
@@ -182,21 +182,21 @@ void tst_QColorTransform::mapRGBAFP16x4()
else
QVERIFY(result != testColor);
- testColor = QRgbaFloat16{0.0f, 0.0f, 0.0f, 1.0f};
+ testColor = QRgbaFloat16{qfloat16(0.0f), qfloat16(0.0f), qfloat16(0.0f), qfloat16(1.0f)};
result = transform.map(testColor);
QCOMPARE(result, testColor);
- testColor = QRgbaFloat16{1.0f, 1.0f, 1.0f, 1.0f};
+ testColor = QRgbaFloat16{qfloat16(1.0f), qfloat16(1.0f), qfloat16(1.0f), qfloat16(1.0f)};
result = transform.map(testColor);
QCOMPARE(result, testColor);
- testColor = QRgbaFloat16{1.0f, 1.0f, 0.0f, 1.0f};
+ testColor = QRgbaFloat16{qfloat16(1.0f), qfloat16(1.0f), qfloat16(1.0f), qfloat16(1.0f)};
result = transform.map(testColor);
QCOMPARE(result.alpha(), 1.0f);
if (sharesRed)
QCOMPARE(result.red(), 1.0f);
- testColor = QRgbaFloat16{0.0f, 1.0f, 1.0f, 1.0f};
+ testColor = QRgbaFloat16{qfloat16(0.0f), qfloat16(1.0f), qfloat16(1.0f), qfloat16(1.0f)};
result = transform.map(testColor);
// QRgbaFloat16 might overflow blue if we convert to a smaller gamut:
QCOMPARE(result.blue16(), 65535);
diff --git a/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp b/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp
index f40e2ac623..586b5938ac 100644
--- a/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp
+++ b/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp
@@ -6993,9 +6993,9 @@ void tst_QRhi::halfPrecisionAttributes()
// To avoid these errors, we pad the vertices to 8 byte stride.
//
static const qfloat16 vertices[] = {
- -1.0, -1.0, 0.0, 0.0,
- 1.0, -1.0, 0.0, 0.0,
- 0.0, 1.0, 0.0, 0.0,
+ qfloat16(-1.0), qfloat16(-1.0), qfloat16(0.0), qfloat16(0.0),
+ qfloat16(1.0), qfloat16(-1.0), qfloat16(0.0), qfloat16(0.0),
+ qfloat16(0.0), qfloat16(1.0), qfloat16(0.0), qfloat16(0.0),
};
QScopedPointer<QRhiBuffer> vbuf(rhi->newBuffer(QRhiBuffer::Immutable, QRhiBuffer::VertexBuffer, sizeof(vertices)));