Fix build with gcc-14
Work-around SiC change made to qfloat16 when using native floats. 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> (cherry picked from commit dcb2186c2a3199d39af09bb81376437b55b907ef) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit a1413a6ecd100cde04a4c72bc0cf90d7c706dd6c) (cherry picked from commit 535afba59b4d5cc09a047132c5c21a210df86e45)
This commit is contained in:
parent
f34a3e6f97
commit
08da29e0dc
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user