* 0001-Fix-encoding-decoding-of-string-literals-for-big-end.patch * 0002-TIntermediate-promoteConstantUnion-fix-conversion-to.patch * 0003-Use-intermOut.cpp-s-IsNan-and-IsInfinity-for-parse-t.patch OBS-URL: https://build.opensuse.org/package/show/KDE:Qt6/qt6-shadertools?expand=0&rev=13
34 lines
1.6 KiB
Diff
34 lines
1.6 KiB
Diff
From 75e3ed99c61b1d201498b5a7fbb6498f902344e0 Mon Sep 17 00:00:00 2001
|
|
From: Marius Hillenbrand <mhillen@linux.ibm.com>
|
|
Date: Wed, 10 Nov 2021 18:10:58 +0100
|
|
Subject: [PATCH 2/3] TIntermediate::promoteConstantUnion(): fix conversion to
|
|
int8
|
|
|
|
The signedness of type char is implementation-defined in C++. The
|
|
conversion to (signed) int8 currently uses a cast to char, which is
|
|
undefined for negative values when the type char is implemented as
|
|
unsigned. Thus, fix to cast to "signed char", which has the intended
|
|
semantic on all implementations.
|
|
|
|
Fixes #2807
|
|
---
|
|
.../glslang/glslang/MachineIndependent/Intermediate.cpp | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/3rdparty/glslang/glslang/MachineIndependent/Intermediate.cpp b/src/3rdparty/glslang/glslang/MachineIndependent/Intermediate.cpp
|
|
index 84b4c55..89538ea 100644
|
|
--- a/src/3rdparty/glslang/glslang/MachineIndependent/Intermediate.cpp
|
|
+++ b/src/3rdparty/glslang/glslang/MachineIndependent/Intermediate.cpp
|
|
@@ -3867,7 +3867,7 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC
|
|
case EbtFloat16: PROMOTE(setDConst, double, Get); break; \
|
|
case EbtFloat: PROMOTE(setDConst, double, Get); break; \
|
|
case EbtDouble: PROMOTE(setDConst, double, Get); break; \
|
|
- case EbtInt8: PROMOTE(setI8Const, char, Get); break; \
|
|
+ case EbtInt8: PROMOTE(setI8Const, signed char, Get); break; \
|
|
case EbtInt16: PROMOTE(setI16Const, short, Get); break; \
|
|
case EbtInt: PROMOTE(setIConst, int, Get); break; \
|
|
case EbtInt64: PROMOTE(setI64Const, long long, Get); break; \
|
|
--
|
|
2.34.1
|
|
|