summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/angle/src/third_party/compiler/ArrayBoundsClamper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/angle/src/third_party/compiler/ArrayBoundsClamper.cpp')
-rw-r--r--src/3rdparty/angle/src/third_party/compiler/ArrayBoundsClamper.cpp10
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