diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
commit | 6630937e63ae5797487b86743a7733c8ae5cc42c (patch) | |
tree | 3d53dacf6430f9099e1fb20835881205de674961 /src/3rdparty/angle/src/third_party/compiler/ArrayBoundsClamper.cpp | |
parent | 37ed6dae00640f9cc980ffda05347c12a7eb5d7e (diff) | |
parent | c7af193d2e49e9f10b86262e63d8d13abf72b5cf (diff) |
Merge commit 'dev' into 'wip/cmake-merge'
Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
Diffstat (limited to 'src/3rdparty/angle/src/third_party/compiler/ArrayBoundsClamper.cpp')
-rw-r--r-- | src/3rdparty/angle/src/third_party/compiler/ArrayBoundsClamper.cpp | 10 |
1 files changed, 9 insertions, 1 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 |