-
Notifications
You must be signed in to change notification settings - Fork 0
/
chromium-64.0.3282.119-gcc-constexpr-fix.patch
70 lines (63 loc) · 3.37 KB
/
chromium-64.0.3282.119-gcc-constexpr-fix.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
diff -up chromium-64.0.3282.119/third_party/angle/src/compiler/translator/StaticType.h.gcc-constexpr chromium-64.0.3282.119/third_party/angle/src/compiler/translator/StaticType.h
--- chromium-64.0.3282.119/third_party/angle/src/compiler/translator/StaticType.h.gcc-constexpr 2018-01-25 15:50:16.971171007 -0500
+++ chromium-64.0.3282.119/third_party/angle/src/compiler/translator/StaticType.h 2018-01-25 15:51:14.158053914 -0500
@@ -160,7 +160,7 @@ template <TBasicType basicType,
TPrecision precision,
TQualifier qualifier,
unsigned char secondarySize>
-const TType *GetForVecMatHelper(unsigned char primarySize)
+constexpr const TType *GetForVecMatHelper(unsigned char primarySize)
{
static_assert(basicType == EbtFloat || basicType == EbtInt || basicType == EbtUInt ||
basicType == EbtBool,
@@ -186,7 +186,7 @@ const TType *GetForVecMatHelper(unsigned
template <TBasicType basicType,
TPrecision precision = EbpUndefined,
TQualifier qualifier = EvqGlobal>
-const TType *GetForVecMat(unsigned char primarySize, unsigned char secondarySize = 1)
+constexpr const TType *GetForVecMat(unsigned char primarySize, unsigned char secondarySize = 1)
{
static_assert(basicType == EbtFloat || basicType == EbtInt || basicType == EbtUInt ||
basicType == EbtBool,
@@ -208,7 +208,7 @@ const TType *GetForVecMat(unsigned char
}
template <TBasicType basicType, TPrecision precision = EbpUndefined>
-const TType *GetForVec(TQualifier qualifier, unsigned char size)
+constexpr const TType *GetForVec(TQualifier qualifier, unsigned char size)
{
switch (qualifier)
{
diff -up chromium-64.0.3282.119/third_party/angle/src/compiler/translator/SymbolTable.cpp.gcc-constexpr chromium-64.0.3282.119/third_party/angle/src/compiler/translator/SymbolTable.cpp
--- chromium-64.0.3282.119/third_party/angle/src/compiler/translator/SymbolTable.cpp.gcc-constexpr 2018-01-25 15:51:27.670790008 -0500
+++ chromium-64.0.3282.119/third_party/angle/src/compiler/translator/SymbolTable.cpp 2018-01-25 15:52:04.117077652 -0500
@@ -189,7 +189,7 @@ TSymbolTable::~TSymbolTable()
pop();
}
-bool IsGenType(const TType *type)
+constexpr bool IsGenType(const TType *type)
{
if (type)
{
@@ -201,7 +201,7 @@ bool IsGenType(const TType *type)
return false;
}
-bool IsVecType(const TType *type)
+constexpr bool IsVecType(const TType *type)
{
if (type)
{
diff -up chromium-64.0.3282.119/third_party/angle/src/compiler/translator/Types.h.gcc-constexpr chromium-64.0.3282.119/third_party/angle/src/compiler/translator/Types.h
--- chromium-64.0.3282.119/third_party/angle/src/compiler/translator/Types.h.gcc-constexpr 2018-01-25 15:52:15.042864767 -0500
+++ chromium-64.0.3282.119/third_party/angle/src/compiler/translator/Types.h 2018-01-25 15:52:56.763049389 -0500
@@ -236,13 +236,13 @@ class TType
{
}
- TBasicType getBasicType() const { return type; }
+ constexpr TBasicType getBasicType() const { return type; }
void setBasicType(TBasicType t);
TPrecision getPrecision() const { return precision; }
void setPrecision(TPrecision p) { precision = p; }
- TQualifier getQualifier() const { return qualifier; }
+ constexpr TQualifier getQualifier() const { return qualifier; }
void setQualifier(TQualifier q) { qualifier = q; }
bool isInvariant() const { return invariant; }