summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/angle/src/third_party/compiler/ArrayBoundsClamper.cpp
diff options
context:
space:
mode:
authorMiguel Costa <miguel.costa@qt.io>2018-06-26 16:56:45 +0200
committerAndre de la Rocha <andre.rocha@qt.io>2018-10-13 21:36:35 +0000
commit0a7aebadfbb3534284546aa3ca8612314c08f136 (patch)
treee94ee33ae3bb9b96fc3047c6455d47ac4920bfbf /src/3rdparty/angle/src/third_party/compiler/ArrayBoundsClamper.cpp
parent656e89f875ad2008ca16cc673b687a22daa294c9 (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/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