summaryrefslogtreecommitdiffstats
path: root/src/angle
diff options
context:
space:
mode:
authorJason Barron <jason.barron@digia.com>2012-10-15 14:16:51 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-24 02:29:15 +0200
commite0c0e83fd5534b24f18d5e02a453182df54933e0 (patch)
treeb0277ef33d668f49a02203de2c99b1cfbaad5291 /src/angle
parent84d09214bc54b4a0cf9860aa27e78ae27bfd69f9 (diff)
Add ANGLE as a 3rdparty library to Qt.
ANGLE is a component that implements the OpenGL ES 2.0 API on top of DirectX 9. See the following for more info: http://code.google.com/p/angleproject/ ANGLE is now the default configuration on Windows. If you want to use desktop OpenGL, you should build Qt with the following configure options: -opengl desktop To configure Qt to use another OpenGL ES 2 implementation, you should use: -opengl es2 -no-angle Task-number: QTBUG-24207 Change-Id: Iefcbeaa37ed920f431729749ab8333b248fe5134 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/angle')
-rw-r--r--src/angle/README.qt29
-rw-r--r--src/angle/angle.pro19
-rw-r--r--src/angle/patches/0003-Fix-Float16ToFloat32.py.patch54
-rw-r--r--src/angle/src/common/common.pri53
-rw-r--r--src/angle/src/compiler/compiler.pro3
-rw-r--r--src/angle/src/compiler/preprocessor/preprocessor.pro58
-rw-r--r--src/angle/src/compiler/translator_common.pro137
-rw-r--r--src/angle/src/compiler/translator_hlsl.pro25
-rw-r--r--src/angle/src/config.pri103
-rw-r--r--src/angle/src/libEGL/libEGL.pro31
-rw-r--r--src/angle/src/libGLESv2/libGLESv2.pro107
-rw-r--r--src/angle/src/src.pro3
12 files changed, 622 insertions, 0 deletions
diff --git a/src/angle/README.qt b/src/angle/README.qt
new file mode 100644
index 0000000000..61023efcd1
--- /dev/null
+++ b/src/angle/README.qt
@@ -0,0 +1,29 @@
+This is the ANGLE project from:
+
+http://code.google.com/p/angleproject/
+
+The upstream version used here can be found in:
+
+src/common/version.h
+
+This copy of the library has been modified with several patches
+that can be found in the 'patches' subdirectory.
+
+Updating ANGLE
+-------------------------------------------------------------
+To update to a newer version of ANGLE, extract the archive
+directly into the 'src/3rdparty/angle' directory. ANGLE contains
+a .gitignore file that will overwrite the one in Qt, but this is
+not desirable so the ANGLE one should be discarded and the one in
+Qt should be kept. If there are new source/header files in ANGLE
+(git status -u) then they should be added to the relevant .pro
+file before committing.
+
+
+Using a custom ANGLE
+-------------------------------------------------------------
+Qt supports building a version of ANGLE other than the one that
+is contained in the source tree. To get Qt to build a different
+copy of ANGLE, you can set the ANGLE_DIR environment variable
+to point to the location of the custom ANGLE before building Qt.
+
diff --git a/src/angle/angle.pro b/src/angle/angle.pro
new file mode 100644
index 0000000000..00e0501d60
--- /dev/null
+++ b/src/angle/angle.pro
@@ -0,0 +1,19 @@
+TEMPLATE = subdirs
+SUBDIRS += src
+
+# We need to call syncqt manually instead of using "load(qt_module_headers)" for several reasons:
+# 1) qt_module_headers assumes the TARGET is the same as the include directory (eg: libGLESv2 != GLES2)
+# 2) If we made a 'QtANGLE' module, the include directory would be flattened which won't work since
+# we need to support "#include <GLES2/gl2.h>"
+!build_pass {
+ qtPrepareTool(QMAKE_SYNCQT, syncqt)
+ QTDIR = $$[QT_HOST_PREFIX]
+ exists($$QTDIR/.qmake.cache): \
+ mod_component_base = $$QTDIR
+ else: \
+ mod_component_base = $$dirname(_QMAKE_CACHE_)
+ QMAKE_SYNCQT += -minimal -module KHR -module EGL -module GLES2 \
+ -mkspecsdir $$[QT_HOST_DATA/get]/mkspecs -outdir $$mod_component_base $$dirname(_QMAKE_CONF_)
+ !silent:message($$QMAKE_SYNCQT)
+ system($$QMAKE_SYNCQT)|error("Failed to run: $$QMAKE_SYNCQT")
+}
diff --git a/src/angle/patches/0003-Fix-Float16ToFloat32.py.patch b/src/angle/patches/0003-Fix-Float16ToFloat32.py.patch
new file mode 100644
index 0000000000..c37ab43fb9
--- /dev/null
+++ b/src/angle/patches/0003-Fix-Float16ToFloat32.py.patch
@@ -0,0 +1,54 @@
+From e4f894847ebefe54f9a9f9911c38dc3efe77c260 Mon Sep 17 00:00:00 2001
+From: Jason Barron <jason.barron@digia.com>
+Date: Tue, 16 Oct 2012 10:34:32 +0200
+Subject: [PATCH 3/3] Fix Float16ToFloat32.py.
+
+To ensure generation of compilable code, the script should
+be using the alternate form of the hex string formatter to
+be sure it gets prefixed by '0x'.
+
+Also remove an extra '=' character.
+
+This issue has been reported upstream to the ANGLE team:
+
+ http://code.google.com/p/angleproject/issues/detail?id=376
+
+Change-Id: I8ccf017afcfbd2c2f52ed291b89f29ba597c9c41
+---
+ src/3rdparty/angle/src/libGLESv2/Float16ToFloat32.py | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/3rdparty/angle/src/libGLESv2/Float16ToFloat32.py b/src/3rdparty/angle/src/libGLESv2/Float16ToFloat32.py
+index ae646ff..fb2964e 100644
+--- a/src/3rdparty/angle/src/libGLESv2/Float16ToFloat32.py
++++ b/src/3rdparty/angle/src/libGLESv2/Float16ToFloat32.py
+@@ -56,22 +56,22 @@ namespace gl
+
+ print "const static unsigned g_mantissa[2048] = {"
+ for i in range(0, 2048):
+- print " %08x," % convertMantissa(i)
++ print " %#10x," % convertMantissa(i)
+ print "};\n"
+
+ print "const static unsigned g_exponent[64] = {"
+ for i in range(0, 64):
+- print " %08x," % convertExponent(i)
++ print " %#10x," % convertExponent(i)
+ print "};\n"
+
+ print "const static unsigned g_offset[64] = {"
+ for i in range(0, 64):
+- print " %08x," % convertOffset(i)
++ print " %#10x," % convertOffset(i)
+ print "};\n"
+
+ print """float float16ToFloat32(unsigned short h)
+ {
+- unsigned i32 = =g_mantissa[g_offset[h >> 10] + (h & 0x3ff)] + g_exponent[h >> 10];
++ unsigned i32 = g_mantissa[g_offset[h >> 10] + (h & 0x3ff)] + g_exponent[h >> 10];
+ return *(float*) &i32;
+ }
+ }
+--
+1.7.11.msysgit.1
+
diff --git a/src/angle/src/common/common.pri b/src/angle/src/common/common.pri
new file mode 100644
index 0000000000..e99080d19f
--- /dev/null
+++ b/src/angle/src/common/common.pri
@@ -0,0 +1,53 @@
+include (../config.pri)
+
+INCLUDEPATH += \
+ $$ANGLE_DIR/src \
+ $$ANGLE_DIR/include
+
+LIBS = $$QMAKE_LIBS_CORE $$QMAKE_LIBS_GUI
+
+# DirectX is included in the Windows 8 Kit, but everything else requires the DX SDK.
+win32-msvc2012 {
+ FXC = fxc.exe
+} else {
+ DX_DIR = $$(DXSDK_DIR)
+ isEmpty(DX_DIR) {
+ error("Cannot determine DirectX SDK location. Please set DXSDK_DIR environment variable.")
+ }
+
+ DXINC_DIR = $$quote($${DX_DIR}Include)
+ contains(QT_ARCH, x86_64) {
+ DXLIB_DIR = $$quote($${DX_DIR}Lib\\x64)
+ } else {
+ DXLIB_DIR = $$quote($${DX_DIR}Lib\\x86)
+ }
+
+ FXC = "\"$${DX_DIR}Utilities\\bin\\x86\\fxc.exe\""
+
+ msvc {
+ # Unfortunately MinGW cannot use the DirectX headers from the DX SDK because d3d11shader.h uses
+ # buffer annotation macros (eg: __out, __in) which are not defined in the MinGW copy of
+ # specstrings_strict.h
+ INCLUDEPATH += $$DXINC_DIR
+
+ # Similarly we want the MinGW linker to use the import libraries shipped with the compiler
+ # instead of those from the SDK which cause a crash on startup.
+ LIBS += -L$$DXLIB_DIR
+ }
+}
+
+# Use the DEF files in release mode
+msvc:CONFIG(release, debug|release) {
+ QMAKE_LFLAGS += /DEF:$$ANGLE_DIR/src/$${TARGET}/$${TARGET}.def
+}
+
+HEADERS += \
+ $$ANGLE_DIR/src/common/angleutils.h \
+ $$ANGLE_DIR/src/common/debug.h \
+ $$ANGLE_DIR/src/common/RefCountObject.h \
+ $$ANGLE_DIR/src/common/version.h
+
+SOURCES += \
+ $$ANGLE_DIR/src/common/debug.cpp \
+ $$ANGLE_DIR/src/common/RefCountObject.cpp
+
diff --git a/src/angle/src/compiler/compiler.pro b/src/angle/src/compiler/compiler.pro
new file mode 100644
index 0000000000..26b03bfc86
--- /dev/null
+++ b/src/angle/src/compiler/compiler.pro
@@ -0,0 +1,3 @@
+TEMPLATE = subdirs
+CONFIG += ordered
+SUBDIRS = preprocessor translator_common.pro translator_hlsl.pro
diff --git a/src/angle/src/compiler/preprocessor/preprocessor.pro b/src/angle/src/compiler/preprocessor/preprocessor.pro
new file mode 100644
index 0000000000..12f83d5281
--- /dev/null
+++ b/src/angle/src/compiler/preprocessor/preprocessor.pro
@@ -0,0 +1,58 @@
+TEMPLATE = lib
+CONFIG += static
+TARGET = preprocessor
+
+include(../../config.pri)
+
+INCLUDEPATH = $$ANGLE_DIR/src/compiler/preprocessor/new
+
+DEFINES += _SECURE_SCL=0
+
+
+FLEX_SOURCES = \
+ $$ANGLE_DIR/src/compiler/preprocessor/new/Tokenizer.l
+
+BISON_SOURCES = \
+ $$ANGLE_DIR/src/compiler/preprocessor/new/ExpressionParser.y
+
+HEADERS += \
+ $$ANGLE_DIR/src/compiler/preprocessor/new/Diagnostics.h \
+ $$ANGLE_DIR/src/compiler/preprocessor/new/DirectiveHandler.h \
+ $$ANGLE_DIR/src/compiler/preprocessor/new/DirectiveParser.h \
+ $$ANGLE_DIR/src/compiler/preprocessor/new/ExpressionParser.h \
+ $$ANGLE_DIR/src/compiler/preprocessor/new/Input.h \
+ $$ANGLE_DIR/src/compiler/preprocessor/new/Lexer.h \
+ $$ANGLE_DIR/src/compiler/preprocessor/new/Macro.h \
+ $$ANGLE_DIR/src/compiler/preprocessor/new/MacroExpander.h \
+ $$ANGLE_DIR/src/compiler/preprocessor/new/numeric_lex.h \
+ $$ANGLE_DIR/src/compiler/preprocessor/new/pp_utils.h \
+ $$ANGLE_DIR/src/compiler/preprocessor/new/Preprocessor.h \
+ $$ANGLE_DIR/src/compiler/preprocessor/new/SourceLocation.h \
+ $$ANGLE_DIR/src/compiler/preprocessor/new/Token.h \
+ $$ANGLE_DIR/src/compiler/preprocessor/new/Tokenizer.h
+
+SOURCES += \
+ $$ANGLE_DIR/src/compiler/preprocessor/new/Diagnostics.cpp \
+ $$ANGLE_DIR/src/compiler/preprocessor/new/DirectiveHandler.cpp \
+ $$ANGLE_DIR/src/compiler/preprocessor/new/DirectiveParser.cpp \
+ $$ANGLE_DIR/src/compiler/preprocessor/new/Input.cpp \
+ $$ANGLE_DIR/src/compiler/preprocessor/new/Lexer.cpp \
+ $$ANGLE_DIR/src/compiler/preprocessor/new/Macro.cpp \
+ $$ANGLE_DIR/src/compiler/preprocessor/new/MacroExpander.cpp \
+ $$ANGLE_DIR/src/compiler/preprocessor/new/Preprocessor.cpp \
+ $$ANGLE_DIR/src/compiler/preprocessor/new/Token.cpp
+
+# NOTE: 'win_flex' and 'bison' can be found in qt5/gnuwin32/bin
+flex.commands = $$addGnuPath(win_flex) --noline --nounistd --outfile=${QMAKE_FILE_BASE}.cpp ${QMAKE_FILE_NAME}
+flex.output = ${QMAKE_FILE_BASE}.cpp
+flex.input = FLEX_SOURCES
+flex.dependency_type = TYPE_C
+flex.variable_out = GENERATED_SOURCES
+QMAKE_EXTRA_COMPILERS += flex
+
+bison.commands = $$addGnuPath(bison) --no-lines --skeleton=yacc.c --output=${QMAKE_FILE_BASE}.cpp ${QMAKE_FILE_NAME}
+bison.output = ${QMAKE_FILE_BASE}.cpp
+bison.input = BISON_SOURCES
+bison.dependency_type = TYPE_C
+bison.variable_out = GENERATED_SOURCES
+QMAKE_EXTRA_COMPILERS += bison
diff --git a/src/angle/src/compiler/translator_common.pro b/src/angle/src/compiler/translator_common.pro
new file mode 100644
index 0000000000..f7f5a8cb6e
--- /dev/null
+++ b/src/angle/src/compiler/translator_common.pro
@@ -0,0 +1,137 @@
+TEMPLATE = lib
+CONFIG += static
+TARGET = translator_common
+
+include(../config.pri)
+
+INCLUDEPATH += \
+ $$ANGLE_DIR/src \
+ $$ANGLE_DIR/include
+
+DEFINES += _SECURE_SCL=0 _LIB COMPILER_IMPLEMENTATION
+
+FLEX_SOURCES = $$ANGLE_DIR/src/compiler/glslang.l
+BISON_SOURCES = $$ANGLE_DIR/src/compiler/glslang.y
+
+HEADERS += \
+ $$ANGLE_DIR/src/compiler/BaseTypes.h \
+ $$ANGLE_DIR/src/compiler/BuiltInFunctionEmulator.h \
+ $$ANGLE_DIR/src/compiler/Common.h \
+ $$ANGLE_DIR/src/compiler/ConstantUnion.h \
+ $$ANGLE_DIR/src/compiler/debug.h \
+ $$ANGLE_DIR/src/compiler/DetectRecursion.h \
+ $$ANGLE_DIR/src/compiler/Diagnostics.h \
+ $$ANGLE_DIR/src/compiler/DirectiveHandler.h \
+ $$ANGLE_DIR/src/compiler/ForLoopUnroll.h \
+ $$ANGLE_DIR/src/compiler/InfoSink.h \
+ $$ANGLE_DIR/src/compiler/Initialize.h \
+ $$ANGLE_DIR/src/compiler/InitializeDll.h \
+ $$ANGLE_DIR/src/compiler/InitializeGlobals.h \
+ $$ANGLE_DIR/src/compiler/InitializeParseContext.h \
+ $$ANGLE_DIR/src/compiler/intermediate.h \
+ $$ANGLE_DIR/src/compiler/localintermediate.h \
+ $$ANGLE_DIR/src/compiler/MapLongVariableNames.h \
+ $$ANGLE_DIR/src/compiler/MMap.h \
+ $$ANGLE_DIR/src/compiler/osinclude.h \
+ $$ANGLE_DIR/src/compiler/ParseHelper.h \
+ $$ANGLE_DIR/src/compiler/PoolAlloc.h \
+ $$ANGLE_DIR/src/compiler/QualifierAlive.h \
+ $$ANGLE_DIR/src/compiler/RemoveTree.h \
+ $$ANGLE_DIR/src/compiler/RenameFunction.h \
+ $$ANGLE_DIR/include/GLSLANG/ResourceLimits.h \
+ $$ANGLE_DIR/include/GLSLANG/ShaderLang.h \
+ $$ANGLE_DIR/src/compiler/ShHandle.h \
+ $$ANGLE_DIR/src/compiler/SymbolTable.h \
+ $$ANGLE_DIR/src/compiler/Types.h \
+ $$ANGLE_DIR/src/compiler/UnfoldShortCircuit.h \
+ $$ANGLE_DIR/src/compiler/util.h \
+ $$ANGLE_DIR/src/compiler/ValidateLimitations.h \
+ $$ANGLE_DIR/src/compiler/VariableInfo.h \
+ $$ANGLE_DIR/src/compiler/VariablePacker.h \
+ $$ANGLE_DIR/src/compiler/preprocessor/atom.h \
+ $$ANGLE_DIR/src/compiler/preprocessor/compile.h \
+ $$ANGLE_DIR/src/compiler/preprocessor/cpp.h \
+ $$ANGLE_DIR/src/compiler/preprocessor/length_limits.h \
+ $$ANGLE_DIR/src/compiler/preprocessor/memory.h \
+ $$ANGLE_DIR/src/compiler/preprocessor/parser.h \
+ $$ANGLE_DIR/src/compiler/preprocessor/preprocess.h \
+ $$ANGLE_DIR/src/compiler/preprocessor/scanner.h \
+ $$ANGLE_DIR/src/compiler/preprocessor/slglobals.h \
+ $$ANGLE_DIR/src/compiler/preprocessor/symbols.h \
+ $$ANGLE_DIR/src/compiler/preprocessor/tokens.h \
+ $$ANGLE_DIR/src/compiler/timing/RestrictFragmentShaderTiming.h \
+ $$ANGLE_DIR/src/compiler/timing/RestrictVertexShaderTiming.h \
+ $$ANGLE_DIR/src/compiler/depgraph/DependencyGraph.h \
+ $$ANGLE_DIR/src/compiler/depgraph/DependencyGraphBuilder.h \
+ $$ANGLE_DIR/src/compiler/depgraph/DependencyGraphOutput.h
+
+SOURCES += \
+ $$ANGLE_DIR/src/compiler/BuiltInFunctionEmulator.cpp \
+ $$ANGLE_DIR/src/compiler/Compiler.cpp \
+ $$ANGLE_DIR/src/compiler/debug.cpp \
+ $$ANGLE_DIR/src/compiler/DetectRecursion.cpp \
+ $$ANGLE_DIR/src/compiler/Diagnostics.cpp \
+ $$ANGLE_DIR/src/compiler/DirectiveHandler.cpp \
+ $$ANGLE_DIR/src/compiler/ForLoopUnroll.cpp \
+ $$ANGLE_DIR/src/compiler/InfoSink.cpp \
+ $$ANGLE_DIR/src/compiler/Initialize.cpp \
+ $$ANGLE_DIR/src/compiler/InitializeDll.cpp \
+ $$ANGLE_DIR/src/compiler/InitializeParseContext.cpp \
+ $$ANGLE_DIR/src/compiler/Intermediate.cpp \
+ $$ANGLE_DIR/src/compiler/intermOut.cpp \
+ $$ANGLE_DIR/src/compiler/IntermTraverse.cpp \
+ $$ANGLE_DIR/src/compiler/MapLongVariableNames.cpp \
+ $$ANGLE_DIR/src/compiler/ossource_win.cpp \
+ $$ANGLE_DIR/src/compiler/parseConst.cpp \
+ $$ANGLE_DIR/src/compiler/ParseHelper.cpp \
+ $$ANGLE_DIR/src/compiler/PoolAlloc.cpp \
+ $$ANGLE_DIR/src/compiler/QualifierAlive.cpp \
+ $$ANGLE_DIR/src/compiler/RemoveTree.cpp \
+ $$ANGLE_DIR/src/compiler/ShaderLang.cpp \
+ $$ANGLE_DIR/src/compiler/SymbolTable.cpp \
+ $$ANGLE_DIR/src/compiler/util.cpp \
+ $$ANGLE_DIR/src/compiler/ValidateLimitations.cpp \
+ $$ANGLE_DIR/src/compiler/VariableInfo.cpp \
+ $$ANGLE_DIR/src/compiler/VariablePacker.cpp \
+ $$ANGLE_DIR/src/compiler/preprocessor/atom.c \
+ $$ANGLE_DIR/src/compiler/preprocessor/cpp.c \
+ $$ANGLE_DIR/src/compiler/preprocessor/cppstruct.c \
+ $$ANGLE_DIR/src/compiler/preprocessor/memory.c \
+ $$ANGLE_DIR/src/compiler/preprocessor/scanner.c \
+ $$ANGLE_DIR/src/compiler/preprocessor/symbols.c \
+ $$ANGLE_DIR/src/compiler/preprocessor/tokens.c \
+ $$ANGLE_DIR/src/compiler/depgraph/DependencyGraph.cpp \
+ $$ANGLE_DIR/src/compiler/depgraph/DependencyGraphBuilder.cpp \
+ $$ANGLE_DIR/src/compiler/depgraph/DependencyGraphOutput.cpp \
+ $$ANGLE_DIR/src/compiler/depgraph/DependencyGraphTraverse.cpp \
+ $$ANGLE_DIR/src/compiler/timing/RestrictFragmentShaderTiming.cpp \
+ $$ANGLE_DIR/src/compiler/timing/RestrictVertexShaderTiming.cpp
+
+# NOTE: 'win_flex' and 'bison' can be found in qt5/gnuwin32/bin
+flex.commands = $$addGnuPath(win_flex) --noline --nounistd --outfile=${QMAKE_FILE_BASE}_lex.cpp ${QMAKE_FILE_NAME}
+flex.output = ${QMAKE_FILE_BASE}_lex.cpp
+flex.input = FLEX_SOURCES
+flex.dependency_type = TYPE_C
+flex.variable_out = GENERATED_SOURCES
+QMAKE_EXTRA_COMPILERS += flex
+
+bison.commands = $$addGnuPath(bison) --no-lines --skeleton=yacc.c --defines=${QMAKE_FILE_BASE}_tab.h \
+ --output=${QMAKE_FILE_BASE}_tab.cpp ${QMAKE_FILE_NAME}
+bison.output = ${QMAKE_FILE_BASE}_tab.h
+bison.input = BISON_SOURCES
+bison.dependency_type = TYPE_C
+bison.variable_out = GENERATED_SOURCES
+QMAKE_EXTRA_COMPILERS += bison
+
+# This is a dummy compiler to work around the fact that an extra compiler can only
+# have one output file even if the command generates two.
+MAKEFILE_NOOP_COMMAND = @echo -n
+msvc: MAKEFILE_NOOP_COMMAND = @echo >NUL
+bison_impl.output = ${QMAKE_FILE_BASE}_tab.cpp
+bison_impl.input = BISON_SOURCES
+bison_impl.commands = $$MAKEFILE_NOOP_COMMAND
+bison_impl.depends = ${QMAKE_FILE_BASE}_tab.h
+bison_impl.output = ${QMAKE_FILE_BASE}_tab.cpp
+bison_impl.variable_out = GENERATED_SOURCES
+QMAKE_EXTRA_COMPILERS += bison_impl
+
diff --git a/src/angle/src/compiler/translator_hlsl.pro b/src/angle/src/compiler/translator_hlsl.pro
new file mode 100644
index 0000000000..e4afaec5c5
--- /dev/null
+++ b/src/angle/src/compiler/translator_hlsl.pro
@@ -0,0 +1,25 @@
+TEMPLATE = lib
+CONFIG += static
+TARGET = translator_hlsl
+
+include(../config.pri)
+
+INCLUDEPATH += $$ANGLE_DIR/src \
+ $$ANGLE_DIR/include
+
+DEFINES += COMPILER_IMPLEMENTATION
+
+HEADERS += \
+ $$ANGLE_DIR/src/compiler/DetectDiscontinuity.h \
+ $$ANGLE_DIR/src/compiler/OutputHLSL.h \
+ $$ANGLE_DIR/src/compiler/SearchSymbol.h \
+ $$ANGLE_DIR/src/compiler/TranslatorHLSL.h \
+ $$ANGLE_DIR/src/compiler/UnfoldShortCircuit.h
+
+SOURCES += \
+ $$ANGLE_DIR/src/compiler/CodeGenHLSL.cpp \
+ $$ANGLE_DIR/src/compiler/DetectDiscontinuity.cpp \
+ $$ANGLE_DIR/src/compiler/OutputHLSL.cpp \
+ $$ANGLE_DIR/src/compiler/SearchSymbol.cpp \
+ $$ANGLE_DIR/src/compiler/TranslatorHLSL.cpp \
+ $$ANGLE_DIR/src/compiler/UnfoldShortCircuit.cpp
diff --git a/src/angle/src/config.pri b/src/angle/src/config.pri
new file mode 100644
index 0000000000..3770d6ef09
--- /dev/null
+++ b/src/angle/src/config.pri
@@ -0,0 +1,103 @@
+# This file contains build options that are relevant for both the compilers
+# and the khronos implementation libraries.
+
+ANGLE_DIR = $$(ANGLE_DIR)
+isEmpty(ANGLE_DIR) {
+ ANGLE_DIR = $$PWD/../../3rdparty/angle
+} else {
+ !build_pass:message("Using external ANGLE from $$ANGLE_DIR")
+}
+
+!exists($$ANGLE_DIR/src) {
+ error("$$ANGLE_DIR does not contain ANGLE")
+}
+
+win32 {
+ GNUTOOLS_DIR=$$[QT_HOST_DATA]/../gnuwin32/bin
+ exists($$GNUTOOLS_DIR/gperf.exe) {
+ GNUTOOLS = "(set $$escape_expand(\\\")PATH=$$replace(GNUTOOLS_DIR, [/\\\\], $${QMAKE_DIR_SEP});%PATH%$$escape_expand(\\\"))"
+ }
+}
+
+defineReplace(addGnuPath) {
+ unset(gnuPath)
+ gnuPath = $$1
+ !isEmpty(gnuPath):!isEmpty(GNUTOOLS) {
+ eval(gnuPath = $${GNUTOOLS} && $$gnuPath)
+ silent: eval(gnuPath = @echo generating sources from ${QMAKE_FILE_IN} && $$val_escape($$gnuPath))
+ }
+ return($$gnuPath)
+}
+
+# Defines for modifying Win32 headers
+DEFINES += _WINDOWS \
+ _UNICODE \
+ _CRT_SECURE_NO_DEPRECATE \
+ _HAS_EXCEPTIONS=0 \
+ NOMINMAX \
+ WIN32_LEAN_AND_MEAN=1
+
+# Defines specifying the API version (0x0600 = Vista)
+DEFINES += _WIN32_WINNT=0x0600 WINVER=0x0600
+
+# ANGLE specific defines
+DEFINES += ANGLE_DISABLE_TRACE \
+ ANGLE_DISABLE_PERF \
+ ANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL0 \
+ ANGLE_USE_NEW_PREPROCESSOR=1
+
+# Force release builds for now. Debug builds of ANGLE will generate libraries with
+# the 'd' library suffix, but this means that the library name no longer matches that
+# listed in the DEF file which causes errors at runtime. Using the DEF is mandatory
+# to generate the import library because the symbols are not marked with __declspec
+# and therefore not exported by default. With the import library, the debug build is
+# useless, so just disable until we can find another solution.
+CONFIG -= debug
+CONFIG += release
+
+TARGET = $$qtLibraryTarget($$TARGET)
+
+CONFIG(debug, debug|release) {
+ DEFINES += _DEBUG
+} else {
+ DEFINES += NDEBUG
+}
+
+# c++11 is needed by MinGW to get support for unordered_map.
+CONFIG -= qt
+CONFIG += stl rtti_off exceptions c++11
+
+INCLUDEPATH += . .. $$PWD/../include
+
+DESTDIR = $$QT_BUILD_TREE/lib
+DLLDESTDIR = $$QT_BUILD_TREE/bin
+
+msvc {
+ # Disabled Warnings:
+ # 4100: 'identifier' : unreferenced formal parameter
+ # 4127: conditional expression is constant
+ # 4189: 'identifier' : local variable is initialized but not referenced
+ # 4239: nonstandard extension used : 'token' : conversion from 'type' to 'type'
+ # 4244: 'argument' : conversion from 'type1' to 'type2', possible loss of data
+ # 4245: 'conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch
+ # 4512: 'class' : assignment operator could not be generated
+ # 4702: unreachable code
+ QMAKE_CFLAGS_WARN_ON = -W4 -wd"4100" -wd"4127" -wd"4189" -wd"4239" -wd"4244" -wd"4245" -wd"4512" -wd"4702"
+ QMAKE_CFLAGS_RELEASE = -O2 -Oy- -MT -Gy -GS -Gm-
+ QMAKE_CFLAGS_DEBUG = -Od -Oy- -MTd -Gy -GS -Gm- -RTC1
+ QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO = -Zi $$QMAKE_CFLAGS_RELEASE
+
+ QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+}
+
+gcc {
+ QMAKE_CFLAGS_WARN_ON = -Wall -Wno-unknown-pragmas -Wno-comment -Wno-missing-field-initializers \
+ -Wno-switch -Wno-unused-parameter -Wno-write-strings -Wno-sign-compare -Wno-missing-braces \
+ -Wno-unused-but-set-variable -Wno-unused-variable -Wno-narrowing -Wno-maybe-uninitialized \
+ -Wno-strict-aliasing -Wno-type-limits
+
+ QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -Wno-reorder -Wno-conversion-null -Wno-delete-non-virtual-dtor
+}
+
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
diff --git a/src/angle/src/libEGL/libEGL.pro b/src/angle/src/libEGL/libEGL.pro
new file mode 100644
index 0000000000..b7182b7fee
--- /dev/null
+++ b/src/angle/src/libEGL/libEGL.pro
@@ -0,0 +1,31 @@
+TEMPLATE = lib
+TARGET = libEGL
+
+include(../common/common.pri)
+
+LIBS += -ld3d9 -ldxguid -ldwmapi \
+ -L$$[QT_INSTALL_LIBS] -llibGLESv2
+
+HEADERS += \
+ $$ANGLE_DIR/src/libEGL/Config.h \
+ $$ANGLE_DIR/src/libEGL/Display.h \
+ $$ANGLE_DIR/src/libEGL/main.h \
+ $$ANGLE_DIR/src/libEGL/resource.h \
+ $$ANGLE_DIR/src/libEGL/ShaderCache.h \
+ $$ANGLE_DIR/src/libEGL/Surface.h
+
+SOURCES += \
+ $$ANGLE_DIR/src/libEGL/Config.cpp \
+ $$ANGLE_DIR/src/libEGL/Display.cpp \
+ $$ANGLE_DIR/src/libEGL/libEGL.cpp \
+ $$ANGLE_DIR/src/libEGL/main.cpp \
+ $$ANGLE_DIR/src/libEGL/Surface.cpp
+
+load(qt_installs)
+
+egl_headers.files = \
+ $$ANGLE_DIR/include/EGL/egl.h \
+ $$ANGLE_DIR/include/EGL/eglext.h \
+ $$ANGLE_DIR/include/EGL/eglplatform.h
+egl_headers.path = $$[QT_INSTALL_HEADERS]/EGL
+INSTALLS += egl_headers
diff --git a/src/angle/src/libGLESv2/libGLESv2.pro b/src/angle/src/libGLESv2/libGLESv2.pro
new file mode 100644
index 0000000000..a4e83ea10d
--- /dev/null
+++ b/src/angle/src/libGLESv2/libGLESv2.pro
@@ -0,0 +1,107 @@
+TEMPLATE = lib
+TARGET = libGLESv2
+DEPENDPATH += . shaders
+
+include(../common/common.pri)
+
+INCLUDEPATH += $$OUT_PWD/..
+
+LIBS += -ld3d9 -ld3dcompiler
+STATICLIBS = translator_common translator_hlsl preprocessor
+
+for(libname, STATICLIBS) {
+ # Appends 'd' to the library for debug builds and builds up the fully
+ # qualified path to pass to the linker.
+ staticlib = $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}$$qtLibraryTarget($$libname).$${QMAKE_EXTENSION_STATICLIB}
+ LIBS += $$staticlib
+ PRE_TARGETDEPS += $$staticlib
+}
+
+HEADERS += \
+ $$ANGLE_DIR/src/libGLESv2/BinaryStream.h \
+ $$ANGLE_DIR/src/libGLESv2/Blit.h \
+ $$ANGLE_DIR/src/libGLESv2/Buffer.h \
+ $$ANGLE_DIR/src/libGLESv2/Context.h \
+ $$ANGLE_DIR/src/libGLESv2/D3DConstantTable.h \
+ $$ANGLE_DIR/src/libGLESv2/Fence.h \
+ $$ANGLE_DIR/src/libGLESv2/Framebuffer.h \
+ $$ANGLE_DIR/src/libGLESv2/HandleAllocator.h \
+ $$ANGLE_DIR/src/libGLESv2/IndexDataManager.h \
+ $$ANGLE_DIR/src/libGLESv2/main.h \
+ $$ANGLE_DIR/src/libGLESv2/mathutil.h \
+ $$ANGLE_DIR/src/libGLESv2/Program.h \
+ $$ANGLE_DIR/src/libGLESv2/ProgramBinary.h \
+ $$ANGLE_DIR/src/libGLESv2/Query.h \
+ $$ANGLE_DIR/src/libGLESv2/Renderbuffer.h \
+ $$ANGLE_DIR/src/libGLESv2/resource.h \
+ $$ANGLE_DIR/src/libGLESv2/ResourceManager.h \
+ $$ANGLE_DIR/src/libGLESv2/Shader.h \
+ $$ANGLE_DIR/src/libGLESv2/Texture.h \
+ $$ANGLE_DIR/src/libGLESv2/utilities.h \
+ $$ANGLE_DIR/src/libGLESv2/vertexconversion.h \
+ $$ANGLE_DIR/src/libGLESv2/VertexDataManager.h
+
+SOURCES += \
+ $$ANGLE_DIR/src/libGLESv2/Blit.cpp \
+ $$ANGLE_DIR/src/libGLESv2/Buffer.cpp \
+ $$ANGLE_DIR/src/libGLESv2/Context.cpp \
+ $$ANGLE_DIR/src/libGLESv2/D3DConstantTable.cpp \
+ $$ANGLE_DIR/src/libGLESv2/Fence.cpp \
+ $$ANGLE_DIR/src/libGLESv2/Framebuffer.cpp \
+ $$ANGLE_DIR/src/libGLESv2/Float16ToFloat32.cpp \
+ $$ANGLE_DIR/src/libGLESv2/HandleAllocator.cpp \
+ $$ANGLE_DIR/src/libGLESv2/IndexDataManager.cpp \
+ $$ANGLE_DIR/src/libGLESv2/libGLESv2.cpp \
+ $$ANGLE_DIR/src/libGLESv2/main.cpp \
+ $$ANGLE_DIR/src/libGLESv2/Program.cpp \
+ $$ANGLE_DIR/src/libGLESv2/ProgramBinary.cpp \
+ $$ANGLE_DIR/src/libGLESv2/Query.cpp \
+ $$ANGLE_DIR/src/libGLESv2/Renderbuffer.cpp \
+ $$ANGLE_DIR/src/libGLESv2/ResourceManager.cpp \
+ $$ANGLE_DIR/src/libGLESv2/Shader.cpp \
+ $$ANGLE_DIR/src/libGLESv2/Texture.cpp \
+ $$ANGLE_DIR/src/libGLESv2/TextureSSE2.cpp \
+ $$ANGLE_DIR/src/libGLESv2/utilities.cpp \
+ $$ANGLE_DIR/src/libGLESv2/VertexDataManager.cpp
+
+float_converter.target = float_converter
+float_converter.commands = python $$ANGLE_DIR/src/libGLESv2/Float16ToFloat32.py \
+ > $$ANGLE_DIR/src/libGLESv2/Float16ToFloat32.cpp
+QMAKE_EXTRA_TARGETS += float_converter
+
+# Generate the shader header files.
+PS_INPUT = $$ANGLE_DIR/src/libGLESv2/shaders/Blit.ps
+VS_INPUT = $$ANGLE_DIR/src/libGLESv2/shaders/Blit.vs
+PIXEL_SHADERS = passthroughps luminanceps componentmaskps
+VERTEX_SHADERS = standardvs flipyvs
+SHADER_DIR = $$OUT_PWD/shaders
+
+for (ps, PIXEL_SHADERS) {
+ fxc_$${ps}.commands = $$FXC /nologo /E $$ps /T ps_2_0 /Fh ${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME}
+ fxc_$${ps}.output = $$SHADER_DIR/$${ps}.h
+ fxc_$${ps}.input = PS_INPUT
+ fxc_$${ps}.dependency_type = TYPE_C
+ fxc_$${ps}.variable_out = HEADERS
+ QMAKE_EXTRA_COMPILERS += fxc_$${ps}
+}
+for (vs, VERTEX_SHADERS) {
+ fxc_$${vs}.commands = $$FXC /nologo /E $$vs /T vs_2_0 /Fh ${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME}
+ fxc_$${vs}.output = $$SHADER_DIR/$${vs}.h
+ fxc_$${vs}.input = VS_INPUT
+ fxc_$${vs}.dependency_type = TYPE_C
+ fxc_$${vs}.variable_out = HEADERS
+ QMAKE_EXTRA_COMPILERS += fxc_$${vs}
+}
+
+load(qt_installs)
+
+khr_headers.files = $$ANGLE_DIR/include/KHR/khrplatform.h
+khr_headers.path = $$[QT_INSTALL_HEADERS]/KHR
+gles2_headers.files = \
+ $$ANGLE_DIR/include/GLES2/gl2.h \
+ $$ANGLE_DIR/include/GLES2/gl2ext.h \
+ $$ANGLE_DIR/include/GLES2/gl2platform.h
+gles2_headers.path = $$[QT_INSTALL_HEADERS]/GLES2
+INSTALLS += khr_headers gles2_headers
+
+
diff --git a/src/angle/src/src.pro b/src/angle/src/src.pro
new file mode 100644
index 0000000000..d1f5f57591
--- /dev/null
+++ b/src/angle/src/src.pro
@@ -0,0 +1,3 @@
+TEMPLATE = subdirs
+SUBDIRS += compiler libGLESv2 libEGL
+CONFIG += ordered