summaryrefslogtreecommitdiffstats
path: root/src/angle/src/compiler
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/src/compiler
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/src/compiler')
-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
4 files changed, 223 insertions, 0 deletions
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