Reorganized new sources from recently applied patch into third_party directory.
Review URL: https://codereview.appspot.com/7105049
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1779 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/AUTHORS b/AUTHORS
index 65c21aa..a2ce915 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -12,7 +12,6 @@
3DLabs Inc. Ltd.
Adobe Systems Inc.
-Apple Inc.
Autodesk, Inc.
Cloud Party, Inc.
Intel Corporation
diff --git a/src/build_angle.gypi b/src/build_angle.gypi
index 6beaf8c..b3c9232 100644
--- a/src/build_angle.gypi
+++ b/src/build_angle.gypi
@@ -64,8 +64,6 @@
'COMPILER_IMPLEMENTATION',
],
'sources': [
- 'compiler/ArrayBoundsClamper.cpp',
- 'compiler/ArrayBoundsClamper.h',
'compiler/BaseTypes.h',
'compiler/BuiltInFunctionEmulator.cpp',
'compiler/BuiltInFunctionEmulator.h',
@@ -143,6 +141,8 @@
'compiler/timing/RestrictFragmentShaderTiming.h',
'compiler/timing/RestrictVertexShaderTiming.cpp',
'compiler/timing/RestrictVertexShaderTiming.h',
+ 'third_party/compiler/ArrayBoundsClamper.cpp',
+ 'third_party/compiler/ArrayBoundsClamper.h',
],
'conditions': [
['OS=="win"', {
diff --git a/src/common/version.h b/src/common/version.h
index 3e321a0..1a8d564 100644
--- a/src/common/version.h
+++ b/src/common/version.h
@@ -1,7 +1,7 @@
#define MAJOR_VERSION 1
#define MINOR_VERSION 1
#define BUILD_VERSION 0
-#define BUILD_REVISION 1717
+#define BUILD_REVISION 1719
#define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x)
diff --git a/src/compiler/Compiler.cpp b/src/compiler/Compiler.cpp
index dce8c68..1e2c945 100644
--- a/src/compiler/Compiler.cpp
+++ b/src/compiler/Compiler.cpp
@@ -4,7 +4,6 @@
// found in the LICENSE file.
//
-#include "compiler/ArrayBoundsClamper.h"
#include "compiler/BuiltInFunctionEmulator.h"
#include "compiler/DetectRecursion.h"
#include "compiler/ForLoopUnroll.h"
@@ -20,6 +19,7 @@
#include "compiler/depgraph/DependencyGraphOutput.h"
#include "compiler/timing/RestrictFragmentShaderTiming.h"
#include "compiler/timing/RestrictVertexShaderTiming.h"
+#include "third_party/compiler/ArrayBoundsClamper.h"
bool isWebGLBasedSpec(ShShaderSpec spec)
{
diff --git a/src/compiler/ShHandle.h b/src/compiler/ShHandle.h
index 9a6f8dd..a50be62 100644
--- a/src/compiler/ShHandle.h
+++ b/src/compiler/ShHandle.h
@@ -16,13 +16,13 @@
#include "GLSLANG/ShaderLang.h"
-#include "compiler/ArrayBoundsClamper.h"
#include "compiler/BuiltInFunctionEmulator.h"
#include "compiler/ExtensionBehavior.h"
#include "compiler/HashNames.h"
#include "compiler/InfoSink.h"
#include "compiler/SymbolTable.h"
#include "compiler/VariableInfo.h"
+#include "third_party/compiler/ArrayBoundsClamper.h"
class LongNameMap;
class TCompiler;
diff --git a/src/compiler/translator_common.vcxproj b/src/compiler/translator_common.vcxproj
index 04d0e32..7d0195b 100644
--- a/src/compiler/translator_common.vcxproj
+++ b/src/compiler/translator_common.vcxproj
@@ -138,7 +138,6 @@
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
- <ClCompile Include="ArrayBoundsClamper.cpp" />
<ClCompile Include="BuiltInFunctionEmulator.cpp" />
<ClCompile Include="Compiler.cpp" />
<ClCompile Include="debug.cpp" />
@@ -174,6 +173,7 @@
<ClCompile Include="depgraph\DependencyGraphTraverse.cpp" />
<ClCompile Include="timing\RestrictFragmentShaderTiming.cpp" />
<ClCompile Include="timing\RestrictVertexShaderTiming.cpp" />
+ <ClCompile Include="..\third_party\compiler\ArrayBoundsClamper.cpp" />
</ItemGroup>
<ItemGroup>
<CustomBuild Include="glslang.l">
@@ -226,7 +226,6 @@
</CustomBuild>
</ItemGroup>
<ItemGroup>
- <ClInclude Include="ArrayBoundsClamper.h" />
<ClInclude Include="BaseTypes.h" />
<ClInclude Include="BuiltInFunctionEmulator.h" />
<ClInclude Include="Common.h" />
@@ -266,8 +265,9 @@
<ClInclude Include="depgraph\DependencyGraph.h" />
<ClInclude Include="depgraph\DependencyGraphBuilder.h" />
<ClInclude Include="depgraph\DependencyGraphOutput.h" />
+ <ClInclude Include="..\third_party\compiler\ArrayBoundsClamper.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
\ No newline at end of file
+</Project>
diff --git a/src/compiler/ArrayBoundsClamper.cpp b/src/third_party/compiler/ArrayBoundsClamper.cpp
similarity index 97%
rename from src/compiler/ArrayBoundsClamper.cpp
rename to src/third_party/compiler/ArrayBoundsClamper.cpp
index 6a31721..33d9b23 100644
--- a/src/compiler/ArrayBoundsClamper.cpp
+++ b/src/third_party/compiler/ArrayBoundsClamper.cpp
@@ -23,7 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "compiler/ArrayBoundsClamper.h"
+#include "third_party/compiler/ArrayBoundsClamper.h"
const char* kIntClampBegin = "// BEGIN: Generated code for array bounds clamping\n\n";
const char* kIntClampEnd = "// END: Generated code for array bounds clamping\n\n";
diff --git a/src/compiler/ArrayBoundsClamper.h b/src/third_party/compiler/ArrayBoundsClamper.h
similarity index 92%
rename from src/compiler/ArrayBoundsClamper.h
rename to src/third_party/compiler/ArrayBoundsClamper.h
index d4a8d69..b63e6d9 100644
--- a/src/compiler/ArrayBoundsClamper.h
+++ b/src/third_party/compiler/ArrayBoundsClamper.h
@@ -23,8 +23,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef COMPILER_ARRAY_BOUNDS_CLAMPER_H_
-#define COMPILER_ARRAY_BOUNDS_CLAMPER_H_
+#ifndef THIRD_PARTY_COMPILER_ARRAY_BOUNDS_CLAMPER_H_
+#define THIRD_PARTY_COMPILER_ARRAY_BOUNDS_CLAMPER_H_
#include "GLSLANG/ShaderLang.h"
@@ -54,4 +54,4 @@
bool mArrayBoundsClampDefinitionNeeded;
};
-#endif // COMPILER_ARRAY_BOUNDS_CLAMPER_H_
+#endif // THIRD_PARTY_COMPILER_ARRAY_BOUNDS_CLAMPER_H_
diff --git a/src/third_party/compiler/LICENSE b/src/third_party/compiler/LICENSE
new file mode 100644
index 0000000..c2cb212
--- /dev/null
+++ b/src/third_party/compiler/LICENSE
@@ -0,0 +1,22 @@
+Copyright (C) 2012 Apple Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY APPLE, INC. ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE, INC. OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/src/third_party/compiler/README.angle b/src/third_party/compiler/README.angle
new file mode 100644
index 0000000..4fdf757
--- /dev/null
+++ b/src/third_party/compiler/README.angle
@@ -0,0 +1,12 @@
+Name: ANGLE array bounds clamper from WebKit
+Short Name: WebKit
+URL: http://webkit.org
+Version: 0
+License: BSD
+Security Critical: yes
+
+Description:
+Implements clamping of array indexing expressions during shader translation.
+
+Local Modifications:
+None