diff options
author | Miguel Costa <miguel.costa@qt.io> | 2018-06-26 16:56:45 +0200 |
---|---|---|
committer | Andre de la Rocha <andre.rocha@qt.io> | 2018-10-13 21:36:35 +0000 |
commit | 0a7aebadfbb3534284546aa3ca8612314c08f136 (patch) | |
tree | e94ee33ae3bb9b96fc3047c6455d47ac4920bfbf /src/3rdparty/angle/src/third_party/compiler | |
parent | 656e89f875ad2008ca16cc673b687a22daa294c9 (diff) |
Update ANGLE to chromium/3280
Change-Id: I0802c0d7486f772d361f87a544d6c5af937f4ca1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/3rdparty/angle/src/third_party/compiler')
-rw-r--r-- | src/3rdparty/angle/src/third_party/compiler/ArrayBoundsClamper.cpp | 10 | ||||
-rw-r--r-- | src/3rdparty/angle/src/third_party/compiler/ArrayBoundsClamper.h | 10 |
2 files changed, 17 insertions, 3 deletions
diff --git a/src/3rdparty/angle/src/third_party/compiler/ArrayBoundsClamper.cpp b/src/3rdparty/angle/src/third_party/compiler/ArrayBoundsClamper.cpp index fa6c8b8d79..17e272301a 100644 --- a/src/3rdparty/angle/src/third_party/compiler/ArrayBoundsClamper.cpp +++ b/src/3rdparty/angle/src/third_party/compiler/ArrayBoundsClamper.cpp @@ -25,6 +25,8 @@ #include "third_party/compiler/ArrayBoundsClamper.h" +#include "compiler/translator/IntermTraverse.h" + // The built-in 'clamp' instruction only accepts floats and returns a float. I // iterated a few times with our driver team who examined the output from our // compiler - they said the multiple casts generates more code than a single @@ -38,7 +40,11 @@ const char* kIntClampBegin = "// BEGIN: Generated code for array bounds clamping const char* kIntClampEnd = "// END: Generated code for array bounds clamping\n\n"; const char* kIntClampDefinition = "int webgl_int_clamp(int value, int minValue, int maxValue) { return ((value < minValue) ? minValue : ((value > maxValue) ? maxValue : value)); }\n\n"; -namespace { +namespace sh +{ + +namespace +{ class ArrayBoundsClamperMarker : public TIntermTraverser { public: @@ -105,3 +111,5 @@ void ArrayBoundsClamper::OutputClampingFunctionDefinition(TInfoSinkBase& out) co } out << kIntClampBegin << kIntClampDefinition << kIntClampEnd; } + +} // namespace sh diff --git a/src/3rdparty/angle/src/third_party/compiler/ArrayBoundsClamper.h b/src/3rdparty/angle/src/third_party/compiler/ArrayBoundsClamper.h index 27917e6eec..a4c407f760 100644 --- a/src/3rdparty/angle/src/third_party/compiler/ArrayBoundsClamper.h +++ b/src/3rdparty/angle/src/third_party/compiler/ArrayBoundsClamper.h @@ -29,8 +29,12 @@ #include "compiler/translator/InfoSink.h" #include "compiler/translator/IntermNode.h" -class ArrayBoundsClamper { -public: +namespace sh +{ + +class ArrayBoundsClamper +{ + public: ArrayBoundsClamper(); // Must be set before compiling any shaders to ensure consistency @@ -57,4 +61,6 @@ private: bool mArrayBoundsClampDefinitionNeeded; }; +} // namespace sh + #endif // THIRD_PARTY_COMPILER_ARRAYBOUNDSCLAMPER_H_ |