diff --git a/Backends/CMakeLists.txt b/Backends/CMakeLists.txt
new file mode 100644
index 00000000..4c68b225
--- /dev/null
+++ b/Backends/CMakeLists.txt
@@ -0,0 +1,5 @@
+cmake_minimum_required(VERSION 2.8)
+
+add_subdirectory(GLSL)
+add_subdirectory(TGSI)
+add_subdirectory(Dummy)
diff --git a/Backends/Dummy/CMakeLists.txt b/Backends/Dummy/CMakeLists.txt
new file mode 100644
index 00000000..32c0d60f
--- /dev/null
+++ b/Backends/Dummy/CMakeLists.txt
@@ -0,0 +1,11 @@
+cmake_minimum_required(VERSION 2.8)
+
+include_directories(. ../../Core ${GLSLANGINCLUDES} ${LLVMINCLUDES})
+
+set(SOURCES
+ BottomToDummy.cpp)
+
+set(HEADERS
+ DummyTarget.h)
+
+add_library(DummyBackend STATIC ${SOURCES} ${HEADERS})
diff --git a/Backends/GLSL/CMakeLists.txt b/Backends/GLSL/CMakeLists.txt
new file mode 100644
index 00000000..5d2f59cb
--- /dev/null
+++ b/Backends/GLSL/CMakeLists.txt
@@ -0,0 +1,11 @@
+cmake_minimum_required(VERSION 2.8)
+
+include_directories(. ../../Core ${GLSLANGINCLUDES} ${LLVMINCLUDES})
+
+set(SOURCES
+ BottomToGLSL.cpp)
+
+set(HEADERS
+ GlslTarget.h)
+
+add_library(GLSLBackend STATIC ${SOURCES} ${HEADERS})
diff --git a/Backends/TGSI/CMakeLists.txt b/Backends/TGSI/CMakeLists.txt
new file mode 100644
index 00000000..ea5044df
--- /dev/null
+++ b/Backends/TGSI/CMakeLists.txt
@@ -0,0 +1,11 @@
+cmake_minimum_required(VERSION 2.8)
+
+include_directories(. ../../Core ${GLSLANGINCLUDES} ${LLVMINCLUDES})
+
+set(SOURCES
+ BottomToTgsi.cpp)
+
+set(HEADERS
+ TgsiTarget.h)
+
+add_library(TgsiBackend STATIC ${SOURCES} ${HEADERS})
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 00000000..3a0639b3
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,28 @@
+cmake_minimum_required(VERSION 2.8)
+
+project(LunarGLASS)
+
+set(LLVMINCLUDES ${CMAKE_SOURCE_DIR}/Core/LLVM/llvm-3.4/build/install/include)
+set(GLSLANGINCLUDES ${CMAKE_SOURCE_DIR}/../glslang)
+
+link_directories(${CMAKE_SOURCE_DIR}/Core/LLVM/llvm-3.4/build/install/lib)
+
+set(LLVMLIBS
+ LLVMCore.lib
+ LLVMAsmParser.lib
+ LLVMipa.lib
+ LLVMLinker.lib
+ LLVMTransformUtils.lib
+ LLVMTarget.lib
+ LLVMAnalysis.lib
+ LLVMScalarOpts.lib
+ LLVMSupport.lib
+ LLVMipo.lib
+ LLVMInstCombine.lib)
+
+add_definitions(-D_SCL_SECURE_NO_WARNINGS)
+
+add_subdirectory(Frontends)
+add_subdirectory(Core)
+add_subdirectory(Backends)
+add_subdirectory(StandAlone)
diff --git a/Core/CMakeLists.txt b/Core/CMakeLists.txt
new file mode 100644
index 00000000..7cbdc7cd
--- /dev/null
+++ b/Core/CMakeLists.txt
@@ -0,0 +1,30 @@
+cmake_minimum_required(VERSION 2.8)
+
+add_subdirectory(Passes)
+
+include_directories(. ${LLVMINCLUDES})
+
+set(SOURCES
+ Backend.cpp
+ BottomIR.cpp
+ BottomTranslator.cpp
+ Exceptions.cpp
+ Options.cpp
+ TopBuilder.cpp
+ TopToBottom.cpp
+ Util.cpp)
+
+set(HEADERS
+ Backend.h
+ BottomIR.h
+ Exceptions.h
+ LunarGLASSManager.h
+ LunarGLASSTopIR.h
+ metadata.h
+ Options.h
+ PrivateManager.h
+ Revision.h
+ TopBuilder.h
+ Util.h)
+
+add_library(core STATIC ${SOURCES} ${HEADERS})
diff --git a/Core/Passes/Analysis/CMakeLists.txt b/Core/Passes/Analysis/CMakeLists.txt
new file mode 100644
index 00000000..9a17b4bc
--- /dev/null
+++ b/Core/Passes/Analysis/CMakeLists.txt
@@ -0,0 +1,11 @@
+cmake_minimum_required(VERSION 2.8)
+
+include_directories(../.. ${LLVMINCLUDES})
+
+set(SOURCES
+ IdentifyStructures.cpp)
+
+set(HEADERS
+ IdentifyStructures.h)
+
+add_library(analysis STATIC ${SOURCES} ${HEADERS})
diff --git a/Core/Passes/CMakeLists.txt b/Core/Passes/CMakeLists.txt
new file mode 100644
index 00000000..f3956767
--- /dev/null
+++ b/Core/Passes/CMakeLists.txt
@@ -0,0 +1,6 @@
+cmake_minimum_required(VERSION 2.8)
+
+add_subdirectory(Analysis)
+add_subdirectory(Immutable)
+add_subdirectory(Transforms)
+add_subdirectory(Util)
diff --git a/Core/Passes/Immutable/CMakeLists.txt b/Core/Passes/Immutable/CMakeLists.txt
new file mode 100644
index 00000000..5d0a182f
--- /dev/null
+++ b/Core/Passes/Immutable/CMakeLists.txt
@@ -0,0 +1,11 @@
+cmake_minimum_required(VERSION 2.8)
+
+include_directories(../.. ${LLVMINCLUDES})
+
+set(SOURCES
+ BackEndPointer.cpp)
+
+set(HEADERS
+ BackEndPointer.h)
+
+add_library(immutable STATIC ${SOURCES} ${HEADERS})
diff --git a/Core/Passes/Transforms/CMakeLists.txt b/Core/Passes/Transforms/CMakeLists.txt
new file mode 100644
index 00000000..6c957152
--- /dev/null
+++ b/Core/Passes/Transforms/CMakeLists.txt
@@ -0,0 +1,14 @@
+cmake_minimum_required(VERSION 2.8)
+
+include_directories(../.. ${LLVMINCLUDES})
+set(SOURCES
+ CanonicalizeCFG.cpp
+ CanonicalizeInsts.cpp
+ CoalesceInserts.cpp
+ DecomposeInsts.cpp
+ FlattenConditionalAssignments.cpp
+ GatherInsts.cpp
+ IntrinsicCombine.cpp
+ Scalarize.cpp)
+
+add_library(transforms STATIC ${SOURCES})
diff --git a/Core/Passes/Util/CMakeLists.txt b/Core/Passes/Util/CMakeLists.txt
new file mode 100644
index 00000000..2804d58c
--- /dev/null
+++ b/Core/Passes/Util/CMakeLists.txt
@@ -0,0 +1,20 @@
+cmake_minimum_required(VERSION 2.8)
+
+include_directories(../.. ${LLVMINCLUDES})
+
+set(SOURCES
+ BasicBlockUtil.cpp
+ ConditionalUtil.cpp
+ InstructionUtil.cpp)
+
+set(HEADERS
+ ADT.h
+ BasicBlockUtil.h
+ ConditionalUtil.h
+ ConstantUtil.h
+ DominatorsUtil.h
+ FunctionUtil.h
+ InstructionUtil.h
+ LoopUtil.h)
+
+add_library(util STATIC ${SOURCES} ${HEADERS})
diff --git a/Frontends/CMakeLists.txt b/Frontends/CMakeLists.txt
new file mode 100644
index 00000000..b04c67d1
--- /dev/null
+++ b/Frontends/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 2.8)
+
+add_subdirectory(glslang)
diff --git a/Frontends/glslang/CMakeLists.txt b/Frontends/glslang/CMakeLists.txt
new file mode 100644
index 00000000..3d3e70ef
--- /dev/null
+++ b/Frontends/glslang/CMakeLists.txt
@@ -0,0 +1,16 @@
+cmake_minimum_required(VERSION 2.8)
+
+include_directories(. ../../Core ${GLSLANGINCLUDES} ${LLVMINCLUDES})
+
+set(SOURCES
+ CodeGen.cpp
+ GlslangToTop.cpp
+ GlslangToTopVisitor.cpp
+ Link.cpp
+ main.cpp)
+
+set(HEADERS
+ GlslangToTop.h
+ GlslangToTopVisitor.h)
+
+add_library(glslangFrontend STATIC ${SOURCES} ${HEADERS})
diff --git a/Standalone/CMakeLists.txt b/Standalone/CMakeLists.txt
new file mode 100644
index 00000000..825c4b30
--- /dev/null
+++ b/Standalone/CMakeLists.txt
@@ -0,0 +1,28 @@
+cmake_minimum_required(VERSION 2.8)
+
+include_directories(.. ../Core ${LLVMINCLUDES})
+
+set(SOURCES
+ LunarGManager.cpp
+ OptionParse.cpp)
+
+add_executable(LunarGOO ${SOURCES})
+
+target_link_libraries(LunarGOO
+ core
+ glslangFrontend
+ GLSLBackend
+ DummyBackend
+ TgsiBackend
+ analysis
+ immutable
+ transforms
+ util
+ ${CMAKE_SOURCE_DIR}/../glslang/build/install/lib/glslang.lib
+ ${CMAKE_SOURCE_DIR}/../glslang/build/install/lib/Preprocessor.lib
+ ${CMAKE_SOURCE_DIR}/../glslang/build/install/lib/OSDependent.lib
+ ${CMAKE_SOURCE_DIR}/../glslang/build/install/lib/OGLCompiler.lib
+ ${LLVMLIBS})
+
+install(TARGETS LunarGOO
+ RUNTIME DESTINATION bin)
diff --git a/Standalone/StandAlone.sln b/Standalone/StandAlone.sln
deleted file mode 100644
index 1b09a5b8..00000000
--- a/Standalone/StandAlone.sln
+++ /dev/null
@@ -1,26 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual C++ Express 2010
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StandAlone", "StandAlone.vcxproj", "{62406B27-D1AE-4A84-B468-CA38F81231BA}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Operators", "..\Tools\Operators\Operators.vcxproj", "{DF6FDC19-C800-4AF8-B262-AB14F83700B5}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {62406B27-D1AE-4A84-B468-CA38F81231BA}.Debug|Win32.ActiveCfg = Debug|Win32
- {62406B27-D1AE-4A84-B468-CA38F81231BA}.Debug|Win32.Build.0 = Debug|Win32
- {62406B27-D1AE-4A84-B468-CA38F81231BA}.Release|Win32.ActiveCfg = Release|Win32
- {62406B27-D1AE-4A84-B468-CA38F81231BA}.Release|Win32.Build.0 = Release|Win32
- {DF6FDC19-C800-4AF8-B262-AB14F83700B5}.Debug|Win32.ActiveCfg = Debug|Win32
- {DF6FDC19-C800-4AF8-B262-AB14F83700B5}.Debug|Win32.Build.0 = Debug|Win32
- {DF6FDC19-C800-4AF8-B262-AB14F83700B5}.Release|Win32.ActiveCfg = Release|Win32
- {DF6FDC19-C800-4AF8-B262-AB14F83700B5}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/Standalone/StandAlone.vcxproj b/Standalone/StandAlone.vcxproj
deleted file mode 100644
index 10afc9c1..00000000
--- a/Standalone/StandAlone.vcxproj
+++ /dev/null
@@ -1,260 +0,0 @@
-
-
-
-
- Debug
- Win32
-
-
- Release
- Win32
-
-
-
- {62406B27-D1AE-4A84-B468-CA38F81231BA}
- StandAlone
- Win32Proj
-
-
-
- Application
-
-
- Application
-
-
-
-
-
-
-
-
-
-
-
-
- <_ProjectFileVersion>10.0.30319.1
- Debug\
- Debug\
- true
- Release\
- Release\
- true
-
-
-
- Disabled
- ../;../Core;../Standalone;../mesa/src/mesa;../mesa/src/mapi;../mesa/include;../mesa/include/c99;../mesa/src/mesa/program;../mesa/src/mesa/main;../mesa/src/glsl;../Core/LLVM/llvm-2.9/build/install/include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
- true
- EnableFastChecks
- MultiThreadedDebugDLL
-
-
- Level3
- EditAndContinue
- 4624;4355;4291;4018;4800;4267;4996;4244;4146;%(DisableSpecificWarnings)
-
-
- LLVMCore.lib;LLVMArchive.lib;LLVMAsmParser.lib;LLVMipa.lib;LLVMLinker.lib;LLVMTransformUtils.lib;LLVMTarget.lib;LLVMAnalysis.lib;LLVMScalarOpts.lib;LLVMSupport.lib;LLVMipo.lib;LLVMInstCombine.lib;%(AdditionalDependencies)
- ../Core/LLVM/llvm-2.9/build/lib/Debug;%(AdditionalLibraryDirectories)
- true
- Console
- MachineX86
-
-
-
-
- WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
- MultiThreadedDLL
-
-
- Level3
- ProgramDatabase
- ../;../Core;../Standalone;../mesa/src/mesa;../mesa/src/mesa/main;../mesa/src/mesa/program;../mesa/src/mapi;../mesa/include;../mesa/include/c99;../mesa/src/glsl;../Core/LLVM/llvm-2.9/build/install/include;%(AdditionalIncludeDirectories)
- 4624;4355;4291;4018;4800;4267;4996;4244;4146;%(DisableSpecificWarnings)
- MaxSpeed
-
-
- true
- Console
- true
- true
- MachineX86
- ../Core/LLVM/llvm-2.9/build/lib/Release;%(AdditionalLibraryDirectories)
- LLVMCore.lib;LLVMArchive.lib;LLVMAsmParser.lib;LLVMipa.lib;LLVMLinker.lib;LLVMTransformUtils.lib;LLVMTarget.lib;LLVMAnalysis.lib;LLVMScalarOpts.lib;LLVMSupport.lib;LLVMipo.lib;LLVMInstCombine.lib;%(AdditionalDependencies)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Document
- type ..\Core\RevisionPrefix > ..\Core\Revision.h & type ..\LastKnownGood >> ..\Core\Revision.h
- Building Revision.h
- ..\Core\Revision.h
- ..\LastKnownGood
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Standalone/StandAlone.vcxproj.filters b/Standalone/StandAlone.vcxproj.filters
deleted file mode 100644
index 248423ac..00000000
--- a/Standalone/StandAlone.vcxproj.filters
+++ /dev/null
@@ -1,532 +0,0 @@
-
-
-
-
- {93995380-89BD-4b04-88EB-625FBE52EBFB}
- h;hpp;hxx;hm;inl;inc;xsd
-
-
- {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
- rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx
-
-
- {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
- cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
-
-
- {3b99a378-26fc-408f-b395-609e8e6ede4b}
-
-
- {dab25d77-a291-43fe-b007-1d5db45c7ffe}
-
-
- {10660ab4-0e1b-4f71-b4ea-c791360b5e14}
-
-
- {da4a373f-7fe3-41c9-a4aa-c93de23ee048}
-
-
- {7989d6ce-9a84-40c6-b293-8b6fab38bbfa}
-
-
- {bf133732-b6de-4cf0-89ee-43ea510be42d}
-
-
- {b339e086-d8b2-4925-a49c-eff520da50ed}
-
-
- {f965b0f4-72d1-456d-b406-07a2eee30284}
-
-
- {bff67a2f-1bb1-4df7-bb49-48650c6b92ac}
-
-
- {b65a1461-97c7-4f20-8d9b-74da4102af3e}
-
-
- {03617591-4e47-4621-8d3f-5f8f5ab0baee}
-
-
- {5a7758d8-8efa-4a5b-a30b-c5bad6914d1b}
-
-
- {a20fb42e-3427-4b5f-a70c-3419c6a5eae3}
-
-
- {7347952d-fbf3-4351-b30f-847c942b2fb1}
-
-
-
-
- Core
-
-
- Core
-
-
- Core
-
-
- Core
-
-
- Core\Passes\Util
-
-
- Core\Passes\Util
-
-
- Core\Passes\Util
-
-
- Core\Passes\Util
-
-
- Core
-
-
- Core
-
-
- Core
-
-
- Core
-
-
- Core
-
-
- Frontends\Glsl2
-
-
- Frontends\Glsl2
-
-
- Backends\GLSL
-
-
- Backends\TGSI
-
-
- Core\Passes\Util
-
-
- Core\Passes\Analysis
-
-
- Backends\Dummy
-
-
- Core\Passes\Immutable
-
-
- Standalone
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
- Core\Passes\Util
-
-
- Core\Passes\Util
-
-
- Core\Passes
-
-
- Core\Passes
-
-
- Core\Passes
-
-
- Core\Passes\Util
-
-
-
-
- Core
-
-
- Core
-
-
- Core
-
-
- Core
-
-
- Core\Passes\Transforms
-
-
- Core\Passes\Transforms
-
-
- Core
-
-
- Core\Passes\Util
-
-
- Core\Passes\Transforms
-
-
- Core
-
-
- Core
-
-
- Core
-
-
- Frontends\Glsl2
-
-
- Frontends\Glsl2
-
-
- Backends\GLSL
-
-
- Backends\TGSI
-
-
- Core\Passes\Util
-
-
- Core\Passes\Transforms
-
-
- Core\Passes\Analysis
-
-
- Backends\Dummy
-
-
- Core\Passes\Immutable
-
-
- Standalone
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Standalone
-
-
- Core\Passes\Transforms
-
-
- Core\Passes\Util
-
-
- Core\Passes\Transforms
-
-
- Core\Passes\Transforms
-
-
- Core\Passes\Transforms
-
-
-
-
- Core
-
-
-
-
- Standalone
-
-
-
\ No newline at end of file
diff --git a/legacy_build/LunarGLASS/LunarGLASS.vcxproj b/legacy_build/LunarGLASS/LunarGLASS.vcxproj
index 39cac8f3..15098919 100644
--- a/legacy_build/LunarGLASS/LunarGLASS.vcxproj
+++ b/legacy_build/LunarGLASS/LunarGLASS.vcxproj
@@ -104,7 +104,7 @@
Level3
Disabled
WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
- ../../;../../Core;../../Standalone;../../Core/LLVM/llvm-3.4/build/install/include;%(AdditionalIncludeDirectories)
+ ../../../glslang;../../;../../Core;../../Standalone;../../Core/LLVM/llvm-3.4/build/install/include;%(AdditionalIncludeDirectories)
4351;4624;4355;4291;4018;4800;4267;4996;4244;4146;%(DisableSpecificWarnings)
ProgramDatabase
@@ -123,7 +123,7 @@
false
WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
4530;4351;4624;4355;4291;4018;4800;4267;4996;4244;4146;%(DisableSpecificWarnings)
- ../../;../../Core;../../Standalone;../../Core/LLVM/llvm-3.4/build/install/include;%(AdditionalIncludeDirectories)
+ ../../../glslang;../../;../../Core;../../Standalone;../../Core/LLVM/llvm-3.4/build/install/include;%(AdditionalIncludeDirectories)
false
diff --git a/legacy_build/Makefile b/legacy_build/Makefile
index 397ca750..083087c4 100644
--- a/legacy_build/Makefile
+++ b/legacy_build/Makefile
@@ -46,7 +46,7 @@ glslang_SOURCES := \
../../glslang/glslang/MachineIndependent/Intermediate.cpp \
../../glslang/glslang/MachineIndependent/intermOut.cpp \
../../glslang/glslang/MachineIndependent/linkValidate.cpp \
- ../../glslang/glslang/MachineIndependent/limits.cpp \
+ ../../glslang/glslang/MachineIndependent/limits.cpp \
../../glslang/glslang/MachineIndependent/IntermTraverse.cpp \
../../glslang/glslang/MachineIndependent/parseConst.cpp \
../../glslang/glslang/MachineIndependent/ParseHelper.cpp \
diff --git a/test/glslang/100ops.frag.out b/test/baseResults/100ops.frag.out
similarity index 100%
rename from test/glslang/100ops.frag.out
rename to test/baseResults/100ops.frag.out
diff --git a/test/glslang/300BuiltIns.frag.out b/test/baseResults/300BuiltIns.frag.out
similarity index 100%
rename from test/glslang/300BuiltIns.frag.out
rename to test/baseResults/300BuiltIns.frag.out
diff --git a/test/glslang/300BuiltIns.vert.out b/test/baseResults/300BuiltIns.vert.out
similarity index 100%
rename from test/glslang/300BuiltIns.vert.out
rename to test/baseResults/300BuiltIns.vert.out
diff --git a/test/glslang/300layout.frag.out b/test/baseResults/300layout.frag.out
similarity index 100%
rename from test/glslang/300layout.frag.out
rename to test/baseResults/300layout.frag.out
diff --git a/test/glslang/300layout.vert.out b/test/baseResults/300layout.vert.out
similarity index 100%
rename from test/glslang/300layout.vert.out
rename to test/baseResults/300layout.vert.out
diff --git a/test/glslang/Operations.frag.out b/test/baseResults/Operations.frag.out
similarity index 93%
rename from test/glslang/Operations.frag.out
rename to test/baseResults/Operations.frag.out
index 03f48e07..7a9dc7ec 100644
--- a/test/glslang/Operations.frag.out
+++ b/test/baseResults/Operations.frag.out
@@ -793,44 +793,44 @@ entry:
%67 = sub i32 %66, %3
%i54 = sdiv i32 %67, %i3
%i55 = srem i32 %i54, %3
- %68 = icmp eq i32 %i55, 2
- %i56 = add i32 %i55, 1
- %.i56 = select i1 %68, i32 0, i32 %i56
- %69 = fadd float %37, %37
- %70 = fmul float %37, %69
- %71 = fsub float %70, %37
- %f57 = fdiv float %71, %37
- %72 = call float @llvm.gla.fLength.f32.v4f32(<4 x float> %v44)
- %f58 = fadd float %f57, %72
- %73 = call float @llvm.gla.fDot4.f32.v4f32.v4f32(<4 x float> %v44, <4 x float> %v44)
- %f60 = fadd float %f58, %73
- %74 = fmul float %37, %f60
- %f61 = fadd float %f60, %74
- %75 = call <3 x float> @llvm.gla.fCross.v3f32.v3f32.v3f32(<3 x float> %47, <3 x float> %47)
- %76 = extractelement <3 x float> %75, i32 0
- %f62 = fadd float %76, %f61
- %77 = fcmp oeq float %f62, %37
- %78 = fcmp one float %f62, %37
- %79 = fcmp one float %f62, 2.000000e+00
- %80 = and i1 %78, %79
- %81 = or i1 %77, %80
+ %68 = fadd float %37, %37
+ %69 = fmul float %37, %68
+ %70 = fsub float %69, %37
+ %f57 = fdiv float %70, %37
+ %71 = call float @llvm.gla.fLength.f32.v4f32(<4 x float> %v44)
+ %f58 = fadd float %f57, %71
+ %72 = call float @llvm.gla.fDot4.f32.v4f32.v4f32(<4 x float> %v44, <4 x float> %v44)
+ %f60 = fadd float %f58, %72
+ %73 = fmul float %37, %f60
+ %f61 = fadd float %f60, %73
+ %74 = call <3 x float> @llvm.gla.fCross.v3f32.v3f32.v3f32(<3 x float> %47, <3 x float> %47)
+ %75 = extractelement <3 x float> %74, i32 0
+ %f62 = fadd float %75, %f61
+ %76 = fcmp oeq float %f62, %37
+ %77 = fcmp one float %f62, %37
+ %78 = fcmp one float %f62, 2.000000e+00
+ %79 = and i1 %77, %78
+ %80 = or i1 %76, %79
%f64 = fadd float %f62, 1.000000e+00
- %select80 = select i1 %81, float %f64, float %f62
- %82 = call <4 x float> @llvm.gla.fSwizzle.v4f32.f32.v4i32(float %select80, <4 x i32> zeroinitializer)
- %83 = load i32 addrspace(2)* @ui, align 4, !gla.uniform !3
- %i66 = and i32 %83, %.i56
+ %select = select i1 %80, float %f64, float %f62
+ %81 = call <4 x float> @llvm.gla.fSwizzle.v4f32.f32.v4i32(float %select, <4 x i32> zeroinitializer)
+ %82 = load i32 addrspace(2)* @ui, align 4, !gla.uniform !3
+ %i56 = add i32 %i55, 1
+ %83 = icmp eq i32 %i55, 2
+ %.i56 = select i1 %83, i32 0, i32 %i56
+ %i66 = and i32 %82, %.i56
%i67 = or i32 %i66, 66
- %i68 = xor i32 %i67, %83
+ %i68 = xor i32 %i67, %82
%i69 = srem i32 %i68, 17
%i70 = ashr i32 %i69, 2
- %i71 = shl i32 %i70, %83
+ %i71 = shl i32 %i70, %82
%i72 = xor i32 %i71, -1
%84 = sitofp i32 %i72 to float
%85 = call <4 x float> @llvm.gla.fSwizzle.v4f32.f32.v4i32(float %84, <4 x i32> zeroinitializer)
- %86 = fadd <4 x float> %85, %82
+ %86 = fadd <4 x float> %81, %85
%ternary76 = fadd <4 x float> %v44, %86
- %select = select i1 %b53, <4 x float> %v44, <4 x float> %ternary76
- call void @llvm.gla.fWriteData.v4f32(i32 1024, i32 -1, <4 x float> %select), !gla.output !9
+ %select80 = select i1 %b53, <4 x float> %v44, <4 x float> %ternary76
+ call void @llvm.gla.fWriteData.v4f32(i32 1024, i32 -1, <4 x float> %select80), !gla.output !9
br label %stage-epilogue
stage-epilogue: ; preds = %entry
@@ -1019,11 +1019,11 @@ uniform ivec4 uiv4;
uniform bool ub;
const vec4 const22 = vec4(0.0174533);
const vec4 const24 = vec4(57.2958);
-const int const141i_2 = 2;
-const int const143i_1 = 1;
-const int const145i_0 = 0;
-const float const161 = 2.0;
-const float const165 = 1.0;
+const float const155 = 2.0;
+const float const159 = 1.0;
+const int const163i_1 = 1;
+const int const165i_2 = 2;
+const int const167i_0 = 0;
const int const170i_66 = 66;
const int const173i_17 = 17;
@@ -1146,42 +1146,42 @@ void main()
int temp137 = temp136 - ui;
int temp138 = temp137 / temp26;
int temp139 = temp138 % ui;
- bool temp140 = temp139 == const141i_2;
- int temp142 = temp139 + const143i_1;
- int di56 = temp140 ? const145i_0 : temp142;
- float temp146 = uf + uf;
- float temp147 = uf * temp146;
- float temp148 = temp147 - uf;
- float temp149 = temp148 / uf;
- float temp150 = length(temp109);
- float temp151 = temp149 + temp150;
- float temp152 = dot(temp109, temp109);
- float temp153 = temp151 + temp152;
- float temp154 = uf * temp153;
- float temp155 = temp153 + temp154;
- vec3 temp156 = cross(temp110, temp110);
- float temp157 = temp156.x + temp155;
- bool temp158 = temp157 == uf;
- bool temp159 = temp157 != uf;
- bool temp160 = temp157 != const161;
- bool temp162 = temp159 && temp160;
- bool temp163 = temp158 || temp162;
- float temp164 = temp157 + const165;
- float select80 = temp163 ? temp164 : temp157;
- vec4 temp167 = vec4(select80);
+ float temp140 = uf + uf;
+ float temp141 = uf * temp140;
+ float temp142 = temp141 - uf;
+ float temp143 = temp142 / uf;
+ float temp144 = length(temp109);
+ float temp145 = temp143 + temp144;
+ float temp146 = dot(temp109, temp109);
+ float temp147 = temp145 + temp146;
+ float temp148 = uf * temp147;
+ float temp149 = temp147 + temp148;
+ vec3 temp150 = cross(temp110, temp110);
+ float temp151 = temp150.x + temp149;
+ bool temp152 = temp151 == uf;
+ bool temp153 = temp151 != uf;
+ bool temp154 = temp151 != const155;
+ bool temp156 = temp153 && temp154;
+ bool temp157 = temp152 || temp156;
+ float temp158 = temp151 + const159;
+ float select = temp157 ? temp158 : temp151;
+ vec4 temp161 = vec4(select);
+ int temp162 = temp139 + const163i_1;
+ bool temp164 = temp139 == const165i_2;
+ int di56 = temp164 ? const167i_0 : temp162;
int temp168 = ui & di56;
int temp169 = temp168 | const170i_66;
int temp171 = temp169 ^ ui;
int temp172 = temp171 % const173i_17;
- int temp174 = temp172 >> const141i_2;
+ int temp174 = temp172 >> const165i_2;
int temp175 = temp174 << ui;
int temp176 = ~(temp175);
float temp177 = float(temp176);
vec4 temp178 = vec4(temp177);
- vec4 temp179 = temp178 + temp167;
+ vec4 temp179 = temp161 + temp178;
vec4 ternary76 = temp109 + temp179;
- vec4 select = temp134 ? temp109 : ternary76;
- gl_FragColor = select;
+ vec4 select80 = temp134 ? temp109 : ternary76;
+ gl_FragColor = select80;
}
@@ -1201,11 +1201,11 @@ uniform ivec4 uiv4;
uniform bool ub;
const vec4 const22 = vec4(0.0174533);
const vec4 const24 = vec4(57.2958);
-const int const141i_2 = 2;
-const int const143i_1 = 1;
-const int const145i_0 = 0;
-const float const161 = 2.0;
-const float const165 = 1.0;
+const float const155 = 2.0;
+const float const159 = 1.0;
+const int const163i_2 = 2;
+const int const165i_1 = 1;
+const int const167i_0 = 0;
const int const170i_66 = 66;
const int const173i_17 = 17;
@@ -1328,42 +1328,42 @@ void main()
int temp137115 = temp136114 - ui;
int temp138116 = temp137115 / temp264;
int temp139117 = temp138116 % ui;
- bool temp140118 = temp139117 == const141i_2;
- int temp142119 = temp139117 + const143i_1;
- int ternaryd0 = temp140118 ? const145i_0 : temp142119;
- float temp146122 = uf + uf;
- float temp147123 = uf * temp146122;
- float temp148124 = temp147123 - uf;
- float temp149125 = temp148124 / uf;
- float temp150126 = length(temp10987);
- float temp151127 = temp149125 + temp150126;
- float temp152128 = dot(temp10987, temp10987);
- float temp153129 = temp151127 + temp152128;
- float temp154130 = uf * temp153129;
- float temp155131 = temp153129 + temp154130;
- vec3 temp156132 = cross(temp110, temp110);
- float temp157133 = temp156132.x + temp155131;
- bool temp158134 = temp157133 == uf;
- bool temp159135 = temp157133 != uf;
- bool temp160136 = temp157133 != const161;
- bool temp162137 = temp159135 && temp160136;
- bool temp163138 = temp158134 || temp162137;
- float temp164139 = temp157133 + const165;
- float select = temp163138 ? temp164139 : temp157133;
- vec4 temp167 = vec4(select);
- int temp168149 = ui & ternaryd0;
+ float temp140118 = uf + uf;
+ float temp141119 = uf * temp140118;
+ float temp142120 = temp141119 - uf;
+ float temp143121 = temp142120 / uf;
+ float temp144122 = length(temp10987);
+ float temp145123 = temp143121 + temp144122;
+ float temp146124 = dot(temp10987, temp10987);
+ float temp147125 = temp145123 + temp146124;
+ float temp148126 = uf * temp147125;
+ float temp149127 = temp147125 + temp148126;
+ vec3 temp150128 = cross(temp110, temp110);
+ float temp151129 = temp150128.x + temp149127;
+ bool temp152130 = temp151129 == uf;
+ bool temp153131 = temp151129 != uf;
+ bool temp154132 = temp151129 != const155;
+ bool temp156133 = temp153131 && temp154132;
+ bool temp157134 = temp152130 || temp156133;
+ float temp158135 = temp151129 + const159;
+ float select169 = temp157134 ? temp158135 : temp151129;
+ vec4 temp161 = vec4(select169);
+ bool temp164142 = temp139117 == const163i_2;
+ int temp162141 = temp139117 + const165i_1;
+ int ternary143d0 = temp164142 ? const167i_0 : temp162141;
+ int temp168149 = ui & ternary143d0;
int temp169150 = temp168149 | const170i_66;
int temp171151 = temp169150 ^ ui;
int temp172152 = temp171151 % const173i_17;
- int temp174153 = temp172152 >> const141i_2;
+ int temp174153 = temp172152 >> const163i_2;
int temp175154 = temp174153 << ui;
int temp176155 = ~(temp175154);
float temp177156 = float(temp176155);
vec4 temp178 = vec4(temp177156);
- vec4 temp179159 = temp178 + temp167;
+ vec4 temp179159 = temp178 + temp161;
vec4 ternary76160 = temp10987 + temp179159;
- vec4 select169 = temp134112 ? temp10987 : ternary76160;
- gl_FragColor = select169;
+ vec4 select = temp134112 ? temp10987 : ternary76160;
+ gl_FragColor = select;
}
diff --git a/test/glslang/aggOps.frag.out b/test/baseResults/aggOps.frag.out
similarity index 94%
rename from test/glslang/aggOps.frag.out
rename to test/baseResults/aggOps.frag.out
index edd361cb..b2359f8b 100644
--- a/test/glslang/aggOps.frag.out
+++ b/test/baseResults/aggOps.frag.out
@@ -395,16 +395,16 @@ ifmerge: ; preds = %else, %then
%23 = fcmp oeq <4 x float> %u, %v.0
%24 = call i1 @llvm.gla.all.v4i1(<4 x i1> %23)
%v27 = fmul <4 x float> %v.0,
- %select139 = select i1 %24, <4 x float> %v27, <4 x float> %v.0
- %25 = fcmp one <4 x float> %u, %select139
+ %select140 = select i1 %24, <4 x float> %v27, <4 x float> %v.0
+ %25 = fcmp one <4 x float> %u, %select140
%26 = call i1 @llvm.gla.any.v4i1(<4 x i1> %25)
- %v31 = fmul <4 x float> %select139,
- %select138 = select i1 %26, <4 x float> %v31, <4 x float> %select139
- %27 = call <2 x float> @llvm.gla.fSwizzle.v2f32.v4f32.v2i32(<4 x float> %select138, <2 x i32> )
+ %v31 = fmul <4 x float> %select140,
+ %select = select i1 %26, <4 x float> %v31, <4 x float> %select140
+ %27 = call <2 x float> @llvm.gla.fSwizzle.v2f32.v4f32.v2i32(<4 x float> %select, <2 x i32> )
%28 = fcmp oeq <2 x float> %coord, %27
%29 = call i1 @llvm.gla.all.v2i1(<2 x i1> %28)
- %v35 = fmul <4 x float> %select138,
- %select141 = select i1 %29, <4 x float> %v35, <4 x float> %select138
+ %v35 = fmul <4 x float> %select,
+ %select141 = select i1 %29, <4 x float> %v35, <4 x float> %select
%30 = icmp eq i32 %1, 17
%31 = fcmp oeq float %2, 1.700000e+01
%32 = and i1 %30, %31
@@ -417,7 +417,7 @@ ifmerge: ; preds = %else, %then
%39 = and i1 %37, %38
%40 = and i1 %36, %39
%v56 = fmul <4 x float> %select141,
- %select140 = select i1 %40, <4 x float> %v56, <4 x float> %select141
+ %select139 = select i1 %40, <4 x float> %v56, <4 x float> %select141
%41 = icmp ne i32 %1, 17
%42 = fcmp one float %2, 1.700000e+01
%43 = or i1 %41, %42
@@ -429,9 +429,9 @@ ifmerge: ; preds = %else, %then
%49 = fcmp one float %11, 1.400000e+01
%50 = or i1 %48, %49
%51 = or i1 %47, %50
- %v77 = fmul <4 x float> %select140,
- %select = select i1 %51, <4 x float> %v77, <4 x float> %select140
- call void @llvm.gla.fWriteData.v4f32(i32 1027, i32 -1, <4 x float> %select), !gla.output !18
+ %v77 = fmul <4 x float> %select139,
+ %select138 = select i1 %51, <4 x float> %v77, <4 x float> %select139
+ call void @llvm.gla.fWriteData.v4f32(i32 1027, i32 -1, <4 x float> %select138), !gla.output !18
br label %stage-epilogue
stage-epilogue: ; preds = %ifmerge
@@ -569,16 +569,16 @@ void main()
bvec4 temp47 = equal(u, vd0);
bool temp48 = all(temp47);
vec4 temp49 = vd0 * const50;
- vec4 select139 = temp48 ? temp49 : vd0;
- bvec4 temp52 = notEqual(u, select139);
+ vec4 select140 = temp48 ? temp49 : vd0;
+ bvec4 temp52 = notEqual(u, select140);
bool temp53 = any(temp52);
- vec4 temp54 = select139 * const55;
- vec4 select138 = temp53 ? temp54 : select139;
- vec2 temp57 = select138.yw;
+ vec4 temp54 = select140 * const55;
+ vec4 select = temp53 ? temp54 : select140;
+ vec2 temp57 = select.yw;
bvec2 temp58 = equal(coord, temp57);
bool temp59 = all(temp58);
- vec4 temp60 = select138 * const61;
- vec4 select141 = temp59 ? temp60 : select138;
+ vec4 temp60 = select * const61;
+ vec4 select141 = temp59 ? temp60 : select;
bool temp63 = temp22 == const64i_17;
bool temp65 = u.y == const66;
bool temp67 = temp63 && temp65;
@@ -591,7 +591,7 @@ void main()
bool temp76 = temp72 && temp74;
bool temp77 = temp71 && temp76;
vec4 temp78 = select141 * const79;
- vec4 select140 = temp77 ? temp78 : select141;
+ vec4 select139 = temp77 ? temp78 : select141;
bool temp81 = temp22 != const64i_17;
bool temp82 = u.y != const66;
bool temp83 = temp81 || temp82;
@@ -603,9 +603,9 @@ void main()
bool temp89 = w.w != const75;
bool temp90 = temp88 || temp89;
bool temp91 = temp87 || temp90;
- vec4 temp92 = select140 * const93;
- vec4 select = temp91 ? temp92 : select140;
- gl_FragColor = select;
+ vec4 temp92 = select139 * const93;
+ vec4 select138 = temp91 ? temp92 : select139;
+ gl_FragColor = select138;
}
@@ -676,16 +676,16 @@ void main()
bvec4 temp4731 = equal(u, vd0d0);
bool temp4832 = all(temp4731);
vec4 temp4933 = vd0d0 * const44;
- vec4 select = temp4832 ? temp4933 : vd0d0;
- bvec4 temp5241 = notEqual(u, select);
+ vec4 select116 = temp4832 ? temp4933 : vd0d0;
+ bvec4 temp5241 = notEqual(u, select116);
bool temp5342 = any(temp5241);
- vec4 temp5443 = select * const49;
- vec4 select116 = temp5342 ? temp5443 : select;
- vec2 temp51 = select116.yw;
+ vec4 temp5443 = select116 * const49;
+ vec4 select114 = temp5342 ? temp5443 : select116;
+ vec2 temp51 = select114.yw;
bvec2 temp5853 = equal(coord, temp51);
bool temp5954 = all(temp5853);
- vec4 temp6055 = select116 * const55;
- vec4 select114 = temp5954 ? temp6055 : select116;
+ vec4 temp6055 = select114 * const55;
+ vec4 select = temp5954 ? temp6055 : select114;
bool temp6363 = temp221 == const58i_17;
bool temp6565 = u.y == const60;
bool temp6766 = temp6363 && temp6565;
@@ -697,8 +697,8 @@ void main()
bool temp7475 = w.w == const69;
bool temp7676 = temp7273 && temp7475;
bool temp7777 = temp7172 && temp7676;
- vec4 temp7878 = select114 * const73;
- vec4 select117 = temp7777 ? temp7878 : select114;
+ vec4 temp7878 = select * const73;
+ vec4 select117 = temp7777 ? temp7878 : select;
bool temp8186 = temp221 != const58i_17;
bool temp8288 = u.y != const60;
bool temp8389 = temp8186 || temp8288;
diff --git a/test/glslang/always-discard.frag.out b/test/baseResults/always-discard.frag.out
similarity index 100%
rename from test/glslang/always-discard.frag.out
rename to test/baseResults/always-discard.frag.out
diff --git a/test/glslang/always-discard2.frag.out b/test/baseResults/always-discard2.frag.out
similarity index 100%
rename from test/glslang/always-discard2.frag.out
rename to test/baseResults/always-discard2.frag.out
diff --git a/test/glslang/block.frag.out b/test/baseResults/block.frag.out
similarity index 100%
rename from test/glslang/block.frag.out
rename to test/baseResults/block.frag.out
diff --git a/test/glslang/conditionalDiscard.frag.out b/test/baseResults/conditionalDiscard.frag.out
similarity index 100%
rename from test/glslang/conditionalDiscard.frag.out
rename to test/baseResults/conditionalDiscard.frag.out
diff --git a/test/glslang/conversion.frag.out b/test/baseResults/conversion.frag.out
similarity index 98%
rename from test/glslang/conversion.frag.out
rename to test/baseResults/conversion.frag.out
index 79ddbf28..6b45cb51 100644
--- a/test/glslang/conversion.frag.out
+++ b/test/baseResults/conversion.frag.out
@@ -692,11 +692,11 @@ then53: ; preds = %entry
%56 = fcmp one <3 x float> %54, %f332
%57 = call i1 @llvm.gla.all.v2i1(<2 x i1> %55)
%58 = fcmp one float %f22, %f12
- %select = select i1 %1, float %ternary4446, float %ternary4448
- %select62 = select i1 %b1, float %f12, float %ternary43
+ %select62 = select i1 %1, float %ternary4446, float %ternary4448
+ %select = select i1 %b1, float %f12, float %ternary43
%59 = call i1 @llvm.gla.any.v3i1(<3 x i1> %56)
%60 = or i1 %58, %57
- %f50 = fadd float %select62, %select
+ %f50 = fadd float %select, %select62
%61 = or i1 %60, %59
%select63 = select i1 %61, float %f50, float %f22
%62 = extractelement <2 x i32> %i236, i32 0
@@ -717,7 +717,7 @@ then53: ; preds = %entry
%77 = add i32 %76, %66
%78 = add i32 %77, %67
%79 = sitofp i32 %78 to float
- %80 = fadd float %select63, %79
+ %80 = fadd float %79, %select63
%81 = fadd float %ternary43, %80
%82 = extractelement <2 x float> %f230, i32 1
%83 = fadd float %82, %81
@@ -980,11 +980,11 @@ void main()
bvec3 temp102 = notEqual(temp99, temp85);
bool temp103 = all(temp100);
bool temp104 = temp72 != temp44;
- float select = temp22 ? temp85.x : ternary4448;
- float select62 = temp26 ? temp44 : temp83.x;
+ float select62 = temp22 ? temp85.x : ternary4448;
+ float select = temp26 ? temp44 : temp83.x;
bool temp107 = any(temp102);
bool temp108 = temp104 || temp103;
- float temp109 = select62 + select;
+ float temp109 = select + select62;
bool temp110 = temp108 || temp107;
float select63 = temp110 ? temp109 : temp72;
int temp112 = temp90.x + temp34;
@@ -997,7 +997,7 @@ void main()
int temp119 = temp118 + temp92.y;
int temp120 = temp119 + temp92.z;
float temp121 = float(temp120);
- float temp122 = select63 + temp121;
+ float temp122 = temp121 + select63;
float temp123 = temp83.x + temp122;
float temp124 = temp83.y + temp123;
float temp125 = temp85.x + temp124;
@@ -1146,13 +1146,13 @@ void main()
bool temp10389 = all(temp10086);
bool temp10490 = temp7252 != temp4423;
float ternary444887 = float(temp9074.y);
- float select141 = temp221 ? temp8568.x : ternary444887;
- float select140 = temp263 ? temp4423 : temp8366.x;
+ float select = temp221 ? temp8568.x : ternary444887;
+ float select142 = temp263 ? temp4423 : temp8366.x;
bool temp107102 = any(temp10288);
bool temp108103 = temp10490 || temp10389;
bool temp110105 = temp108103 || temp107102;
- float temp109104 = select140 + select141;
- float select = temp110105 ? temp109104 : temp7252;
+ float temp109104 = select + select142;
+ float select140 = temp110105 ? temp109104 : temp7252;
int temp112113 = temp9074.x + temp3413;
int temp113114 = temp112113 + temp9074.y;
int temp114115 = temp113114 + temp9480.x;
@@ -1163,7 +1163,7 @@ void main()
int temp119120 = temp118119 + temp9277.y;
int temp120121 = temp119120 + temp9277.z;
float temp121122 = float(temp120121);
- float temp122123 = temp121122 + select;
+ float temp122123 = temp121122 + select140;
float temp123124 = temp8366.x + temp122123;
float temp124125 = temp8366.y + temp123124;
float temp125126 = temp8568.x + temp124125;
diff --git a/test/glslang/dataOut.frag.out b/test/baseResults/dataOut.frag.out
similarity index 100%
rename from test/glslang/dataOut.frag.out
rename to test/baseResults/dataOut.frag.out
diff --git a/test/glslang/dataOutIndirect.frag.out b/test/baseResults/dataOutIndirect.frag.out
similarity index 100%
rename from test/glslang/dataOutIndirect.frag.out
rename to test/baseResults/dataOutIndirect.frag.out
diff --git a/test/glslang/dataOutIndirect.vert.out b/test/baseResults/dataOutIndirect.vert.out
similarity index 100%
rename from test/glslang/dataOutIndirect.vert.out
rename to test/baseResults/dataOutIndirect.vert.out
diff --git a/test/glslang/deepRvalue.frag.out b/test/baseResults/deepRvalue.frag.out
similarity index 100%
rename from test/glslang/deepRvalue.frag.out
rename to test/baseResults/deepRvalue.frag.out
diff --git a/test/glslang/depthOut.frag.out b/test/baseResults/depthOut.frag.out
similarity index 100%
rename from test/glslang/depthOut.frag.out
rename to test/baseResults/depthOut.frag.out
diff --git a/test/glslang/discard-dce.frag.out b/test/baseResults/discard-dce.frag.out
similarity index 100%
rename from test/glslang/discard-dce.frag.out
rename to test/baseResults/discard-dce.frag.out
diff --git a/test/glslang/doWhileLoop.frag.out b/test/baseResults/doWhileLoop.frag.out
similarity index 100%
rename from test/glslang/doWhileLoop.frag.out
rename to test/baseResults/doWhileLoop.frag.out
diff --git a/test/glslang/earlyReturnDiscard.frag.out b/test/baseResults/earlyReturnDiscard.frag.out
similarity index 100%
rename from test/glslang/earlyReturnDiscard.frag.out
rename to test/baseResults/earlyReturnDiscard.frag.out
diff --git a/test/glslang/flowControl.frag.out b/test/baseResults/flowControl.frag.out
similarity index 100%
rename from test/glslang/flowControl.frag.out
rename to test/baseResults/flowControl.frag.out
diff --git a/test/glslang/forLoop.frag.out b/test/baseResults/forLoop.frag.out
similarity index 100%
rename from test/glslang/forLoop.frag.out
rename to test/baseResults/forLoop.frag.out
diff --git a/test/glslang/forwardFun.frag.out b/test/baseResults/forwardFun.frag.out
similarity index 100%
rename from test/glslang/forwardFun.frag.out
rename to test/baseResults/forwardFun.frag.out
diff --git a/test/glslang/functionCall.frag.out b/test/baseResults/functionCall.frag.out
similarity index 100%
rename from test/glslang/functionCall.frag.out
rename to test/baseResults/functionCall.frag.out
diff --git a/test/glslang/functionSemantics.frag.out b/test/baseResults/functionSemantics.frag.out
similarity index 100%
rename from test/glslang/functionSemantics.frag.out
rename to test/baseResults/functionSemantics.frag.out
diff --git a/test/glslang/length.frag.out b/test/baseResults/length.frag.out
similarity index 100%
rename from test/glslang/length.frag.out
rename to test/baseResults/length.frag.out
diff --git a/test/glslang/localAggregates.frag.out b/test/baseResults/localAggregates.frag.out
similarity index 99%
rename from test/glslang/localAggregates.frag.out
rename to test/baseResults/localAggregates.frag.out
index 196b3e00..7de2026b 100644
--- a/test/glslang/localAggregates.frag.out
+++ b/test/baseResults/localAggregates.frag.out
@@ -409,11 +409,11 @@ const float const30 = 2.0;
void main()
{
bool temp211 = foo3.s2_1.i > const22i_0;
- float select = temp211 ? const24 : coord.x;
+ float select33 = temp211 ? const24 : coord.x;
bool temp254 = condition == const26i_1;
float select34 = temp254 ? coord.x : const28;
- float select33 = temp211 ? coord.x : const30;
- float temp3119 = select + select33;
+ float select = temp211 ? coord.x : const30;
+ float temp3119 = select33 + select;
float temp3221 = coord.x + temp3119;
float temp3322 = select34 + temp3221;
vec4 temp34 = vec4(temp3322);
diff --git a/test/glslang/loops.frag.out b/test/baseResults/loops.frag.out
similarity index 98%
rename from test/glslang/loops.frag.out
rename to test/baseResults/loops.frag.out
index 8df9a679..eac8ee04 100644
--- a/test/glslang/loops.frag.out
+++ b/test/baseResults/loops.frag.out
@@ -1535,8 +1535,8 @@ entry:
%0 = extractelement <4 x float> %BaseColor, i32 0
%1 = fcmp olt float %0, 0x3FD51EB860000000
%2 = fcmp olt float %0, 0x3FE51EB860000000
- %select339.v = select i1 %2, <4 x float> , <4 x float>
- %select344.v = select i1 %1, <4 x float> , <4 x float> %select339.v
+ %select338.v = select i1 %2, <4 x float> , <4 x float>
+ %select344.v = select i1 %1, <4 x float> , <4 x float> %select338.v
%select344 = fadd <4 x float> %BaseColor, %select344.v
%.pre = load float addrspace(2)* @d, align 4, !gla.uniform !3
%3 = load <4 x float> addrspace(2)* @bigColor, align 16, !gla.uniform !5
@@ -1787,7 +1787,7 @@ then65: ; preds = %loop-header63
br label %loop-header80
loop-header80: ; preds = %ifmerge83, %then65
- %color.10 = phi <4 x float> [ %152, %then65 ], [ %select, %ifmerge83 ]
+ %color.10 = phi <4 x float> [ %152, %then65 ], [ %select342, %ifmerge83 ]
%i79.0 = phi i32 [ 0, %then65 ], [ %i7992, %ifmerge83 ]
%exitcond392 = icmp eq i32 %i79.0, 100
br i1 %exitcond392, label %then81, label %ifmerge83
@@ -1804,12 +1804,12 @@ ifmerge83: ; preds = %loop-header80
%158 = extractelement <4 x float> %color.10, i32 1
%159 = fadd float %158, 1.000000e+00
%160 = call <4 x float> @llvm.gla.fMultiInsert.v4f32.v4f32.f32.f32.f32.f32(<4 x float> %color.10, i32 2, float undef, i32 undef, float %159, i32 0, float undef, i32 undef, float undef, i32 undef)
- %select = select i1 %154, <4 x float> %157, <4 x float> %160
+ %select342 = select i1 %154, <4 x float> %157, <4 x float> %160
%i7992 = add i32 %i79.0, 1
br label %loop-header80
loop-header96: ; preds = %ifmerge99, %then81
- %color.12 = phi <4 x float> [ %color.10, %then81 ], [ %select335, %ifmerge99 ]
+ %color.12 = phi <4 x float> [ %color.10, %then81 ], [ %select336, %ifmerge99 ]
%i95.0 = phi i32 [ 0, %then81 ], [ %i95105, %ifmerge99 ]
%exitcond = icmp eq i32 %i95.0, 120
br i1 %exitcond, label %then97, label %ifmerge99
@@ -1827,13 +1827,13 @@ ifmerge99: ; preds = %loop-header96
%167 = extractelement <4 x float> %color.12, i32 1
%168 = fadd float %167, 1.000000e+00
%169 = call <4 x float> @llvm.gla.fMultiInsert.v4f32.v4f32.f32.f32.f32.f32(<4 x float> %color.12, i32 2, float undef, i32 undef, float %168, i32 0, float undef, i32 undef, float undef, i32 undef)
- %select335 = select i1 %163, <4 x float> %166, <4 x float> %169
+ %select336 = select i1 %163, <4 x float> %166, <4 x float> %169
%i95105 = add i32 %i95.0, 1
br label %loop-header96
loop-header109: ; preds = %ifmerge112, %then97
- %color.14 = phi <4 x float> [ %color.12, %then97 ], [ %select342, %ifmerge112 ]
- %i108.0 = phi i32 [ 0, %then97 ], [ %select343, %ifmerge112 ]
+ %color.14 = phi <4 x float> [ %color.12, %then97 ], [ %select339, %ifmerge112 ]
+ %i108.0 = phi i32 [ 0, %then97 ], [ %select340, %ifmerge112 ]
%170 = icmp sgt i32 %i108.0, 41
br i1 %170, label %then110, label %ifmerge112
@@ -1849,10 +1849,10 @@ ifmerge112: ; preds = %loop-header109
%176 = extractelement <4 x float> %color.14, i32 3
%177 = fadd float %176, 1.000000e+00
%178 = call <4 x float> @llvm.gla.fMultiInsert.v4f32.v4f32.f32.f32.f32.f32(<4 x float> %color.14, i32 12, float undef, i32 undef, float undef, i32 undef, float %172, i32 0, float %177, i32 0)
- %select342 = select i1 %175, <4 x float> %173, <4 x float> %178
+ %select339 = select i1 %175, <4 x float> %173, <4 x float> %178
%179 = zext i1 %175 to i32
%i108118 = xor i32 %179, 1
- %select343 = add i32 %i108.0, %i108118
+ %select340 = add i32 %i108.0, %i108118
br label %loop-header109
loop-header122: ; preds = %ifmerge129, %then110
@@ -1898,7 +1898,7 @@ then136: ; preds = %loop-header134
br label %loop-header134.backedge
loop-header134.backedge: ; preds = %then136, %ifmerge146
- %color.17.be = phi <4 x float> [ %color135, %then136 ], [ %select336, %ifmerge146 ]
+ %color.17.be = phi <4 x float> [ %color135, %then136 ], [ %select, %ifmerge146 ]
br label %loop-header134
ifmerge138: ; preds = %loop-header134
@@ -1908,8 +1908,8 @@ ifmerge138: ; preds = %loop-header134
%194 = call <4 x float> @llvm.gla.fMultiInsert.v4f32.v4f32.f32.f32.f32.f32(<4 x float> %color135, i32 2, float undef, i32 undef, float %193, i32 0, float undef, i32 undef, float undef, i32 undef)
%195 = fadd float %161, %189
%196 = call <4 x float> @llvm.gla.fMultiInsert.v4f32.v4f32.f32.f32.f32.f32(<4 x float> %color135, i32 1, float %195, i32 0, float undef, i32 undef, float undef, i32 undef, float undef, i32 undef)
- %select336 = select i1 %192, <4 x float> %194, <4 x float> %196
- %197 = extractelement <4 x float> %select336, i32 2
+ %select = select i1 %192, <4 x float> %194, <4 x float> %196
+ %197 = extractelement <4 x float> %select, i32 2
%198 = fcmp uge float %197, %161
br i1 %198, label %then144, label %ifmerge146
@@ -1922,7 +1922,7 @@ ifmerge146: ; preds = %ifmerge138
br label %loop-header134.backedge
loop-header149: ; preds = %loop-header149, %then144
- %color.19 = phi <4 x float> [ %select336, %then144 ], [ %select341, %loop-header149 ]
+ %color.19 = phi <4 x float> [ %select, %then144 ], [ %select341, %loop-header149 ]
%color150 = fadd <4 x float> %color.19, %.pre351
%199 = extractelement <4 x float> %color150, i32 1
%200 = fcmp olt float %199, %.pre352
@@ -2081,7 +2081,7 @@ then217: ; preds = %ifmerge215
%242 = extractelement <4 x float> %color216, i32 0
%243 = fadd float %242, 1.000000e+00
%244 = call <4 x float> @llvm.gla.fMultiInsert.v4f32.v4f32.f32.f32.f32.f32(<4 x float> %color216, i32 5, float %243, i32 0, float undef, i32 undef, float %237, i32 0, float undef, i32 undef)
- %select340 = select i1 %238, <4 x float> %241, <4 x float> %244
+ %select333 = select i1 %238, <4 x float> %241, <4 x float> %244
br label %loop-merge232
ifmerge225: ; preds = %ifmerge215
@@ -2094,7 +2094,7 @@ then228: ; preds = %ifmerge225
br label %loop-merge232
loop-merge232: ; preds = %then228, %then217, %then213
- %color.32 = phi <4 x float> [ %color.30, %then213 ], [ %select340, %then217 ], [ %color227, %then228 ]
+ %color.32 = phi <4 x float> [ %color.30, %then213 ], [ %select333, %then217 ], [ %color227, %then228 ]
%.pre355 = load float addrspace(2)* @d9, align 4, !gla.uniform !23
%247 = fcmp ogt float %.pre355, %.pre354
br label %loop-header233
@@ -2144,7 +2144,7 @@ loop-merge247: ; preds = %else241, %then234
br label %loop-header248
loop-header248: ; preds = %then253, %loop-merge247
- %color.36 = phi <4 x float> [ %color.33, %loop-merge247 ], [ %select338, %then253 ]
+ %color.36 = phi <4 x float> [ %color.33, %loop-merge247 ], [ %select335, %then253 ]
%258 = extractelement <4 x float> %color.36, i32 2
%259 = fcmp uge float %258, %.pre356
br i1 %259, label %then249, label %ifmerge251
@@ -2168,7 +2168,7 @@ then253: ; preds = %ifmerge251
%269 = extractelement <4 x float> %color.36, i32 0
%270 = fadd float %269, 1.000000e+00
%271 = call <4 x float> @llvm.gla.fMultiInsert.v4f32.v4f32.f32.f32.f32.f32(<4 x float> %262, i32 5, float %270, i32 0, float undef, i32 undef, float %264, i32 0, float undef, i32 undef)
- %select338 = select i1 %266, <4 x float> %268, <4 x float> %271
+ %select335 = select i1 %266, <4 x float> %268, <4 x float> %271
br label %loop-header248
ifmerge261: ; preds = %ifmerge251
@@ -2182,7 +2182,7 @@ loop-merge265: ; preds = %ifmerge261, %then24
br label %loop-header266
loop-header266: ; preds = %ifmerge269, %loop-merge265
- %color.39 = phi <4 x float> [ %color.38, %loop-merge265 ], [ %select337, %ifmerge269 ]
+ %color.39 = phi <4 x float> [ %color.38, %loop-merge265 ], [ %select343, %ifmerge269 ]
%274 = extractelement <4 x float> %color.39, i32 0
%275 = fcmp uge float %274, 1.000000e+01
br i1 %275, label %then267, label %ifmerge269
@@ -2202,8 +2202,8 @@ ifmerge269: ; preds = %loop-header266
%281 = extractelement <4 x float> %color270, i32 1
%282 = fadd float %281, %273
%283 = call <4 x float> @llvm.gla.fMultiInsert.v4f32.v4f32.f32.f32.f32.f32(<4 x float> %color270, i32 2, float undef, i32 undef, float %282, i32 0, float undef, i32 undef, float undef, i32 undef)
- %select333 = select i1 %280, <4 x float> %color270, <4 x float> %283
- %select337 = select i1 %278, <4 x float> %select333, <4 x float> %283
+ %select337 = select i1 %280, <4 x float> %color270, <4 x float> %283
+ %select343 = select i1 %278, <4 x float> %select337, <4 x float> %283
br label %loop-header266
loop-header280: ; preds = %else285, %then267
@@ -2474,7 +2474,7 @@ const float const181 = 1.0;
const int const193i_41 = 41;
const int const202i_1 = 1;
vec4 temp206;
-vec4 select336;
+vec4 select;
vec4 select341;
float temp225;
vec4 color181;
@@ -2537,8 +2537,8 @@ void main()
vec4 FragColor_shadow330d0;
bool temp66 = BaseColor.x < const67;
bool temp68 = BaseColor.x < const69;
- vec4 select339dv = temp68 ? const71 : const72;
- vec4 select344dv = temp66 ? const72 : select339dv;
+ vec4 select338dv = temp68 ? const71 : const72;
+ vec4 select344dv = temp66 ? const72 : select338dv;
vec4 select344 = BaseColor + select344dv;
colord1 = select344;
while (! (colord1.x >= d)){
@@ -2742,8 +2742,8 @@ void main()
float temp183 = colord10.y + const181;
vec4 temp184 = colord10;
temp184.y = temp183;
- vec4 select = temp178 ? temp182 : temp184;
- colord10 = select;
+ vec4 select342 = temp178 ? temp182 : temp184;
+ colord10 = select342;
}
colord12 = colord10;
@@ -2756,8 +2756,8 @@ void main()
float temp189 = colord12.y + const181;
vec4 temp190 = colord12;
temp190.y = temp189;
- vec4 select335 = temp186 ? temp188 : temp190;
- colord12 = select335;
+ vec4 select336 = temp186 ? temp188 : temp190;
+ colord12 = select336;
}
colord14 = colord12;
@@ -2775,12 +2775,12 @@ void main()
float temp197 = colord14.w + const181;
vec4 temp198 = colord14;
temp198.zw = vec2(temp194, temp197);
- vec4 select342 = temp196 ? temp195 : temp198;
+ vec4 select339 = temp196 ? temp195 : temp198;
int temp200 = int(temp196);
int temp201 = temp200 ^ const202i_1;
- int select343 = temp35 + temp201;
- colord14 = select342;
- temp35 = select343;
+ int select340 = temp35 + temp201;
+ colord14 = select339;
+ temp35 = select340;
}
colord15 = colord14;
@@ -2824,19 +2824,19 @@ void main()
float temp216 = d4 + color135.x;
vec4 temp217 = color135;
temp217.x = temp216;
- select336 = temp213 ? temp215 : temp217;
- bool temp219 = select336.z >= d4;
+ select = temp213 ? temp215 : temp217;
+ bool temp219 = select.z >= d4;
if (temp219) {
break;
}
- colord17dbe = select336;
+ colord17dbe = select;
}
colord17 = colord17dbe;
}
- colord19 = select336;
+ colord19 = select;
while (true) {
vec4 color150 = colord19 + bigColor5;
bool temp221 = color150.y < d5;
@@ -2946,8 +2946,8 @@ void main()
float temp251 = color216.x + const181;
vec4 temp252 = color216;
temp252.xz = vec2(temp251, temp246);
- vec4 select340 = temp247 ? temp250 : temp252;
- colord32 = select340;
+ vec4 select333 = temp247 ? temp250 : temp252;
+ colord32 = select333;
break;
}
@@ -3006,8 +3006,8 @@ void main()
float temp270 = colord36.x + const181;
vec4 temp271 = temp263;
temp271.xz = vec2(temp270, temp266);
- vec4 select338 = temp267 ? temp269 : temp271;
- colord36 = select338;
+ vec4 select335 = temp267 ? temp269 : temp271;
+ colord36 = select335;
}
colord38 = colord36;
@@ -3019,9 +3019,9 @@ void main()
float temp277 = color270.y + bigColor8.x;
vec4 temp278 = color270;
temp278.y = temp277;
- vec4 select333 = temp276 ? color270 : temp278;
- vec4 select337 = temp275 ? select333 : temp278;
- colord39 = select337;
+ vec4 select337 = temp276 ? color270 : temp278;
+ vec4 select343 = temp275 ? select337 : temp278;
+ colord39 = select343;
}
vec4 color279 = colord39 + const82;
@@ -3164,7 +3164,7 @@ const int const146i_41 = 41;
const int const155i_1 = 1;
vec4 temp159;
vec4 select679;
-vec4 select681;
+vec4 select680;
float temp178;
const float const190 = 0.0;
vec4 color200;
@@ -3233,8 +3233,8 @@ void main()
vec4 color2323 = colord2d0 + bigColor1_1;
bool temp7724 = color2323.w < d;
vec4 color2725 = bigColor1_1 + color2323;
- vec4 select = temp7724 ? color2323 : color2725;
- colord2d0 = select;
+ vec4 select676 = temp7724 ? color2323 : color2725;
+ colord2d0 = select676;
}
colord3d0 = colord2d0;
@@ -3333,8 +3333,8 @@ void main()
float temp183232 = colord10d0.y + const134;
vec4 temp137 = colord10d0;
temp137.y = temp183232;
- vec4 select676 = temp178228 ? temp135 : temp137;
- colord10d0 = select676;
+ vec4 select681 = temp178228 ? temp135 : temp137;
+ colord10d0 = select681;
}
temp33d0 = const130i_0;
@@ -3347,8 +3347,8 @@ void main()
float temp189255 = colord12d0.y + const134;
vec4 temp143 = colord12d0;
temp143.y = temp189255;
- vec4 select678 = temp186251 ? temp141 : temp143;
- colord12d0 = select678;
+ vec4 select682 = temp186251 ? temp141 : temp143;
+ colord12d0 = select682;
}
temp35d0 = const130i_0;
@@ -3366,12 +3366,12 @@ void main()
float temp197282 = colord14d0.w + const134;
vec4 temp151 = colord14d0;
temp151.zw = vec2(temp194278, temp197282);
- vec4 select680 = temp196281 ? temp149 : temp151;
+ vec4 select = temp196281 ? temp149 : temp151;
int temp200292 = int(temp196281);
int temp201293 = temp200292 ^ const155i_1;
- int select343294 = temp201293 + temp35d0;
- temp35d0 = select343294;
- colord14d0 = select680;
+ int select340294 = temp201293 + temp35d0;
+ temp35d0 = select340294;
+ colord14d0 = select;
}
temp37d0 = const130i_0;
@@ -3434,18 +3434,18 @@ void main()
float temp222363 = d5 + color150361.y;
vec4 temp176 = color150361;
temp176.y = temp222363;
- select681 = temp221362 ? temp176 : color150361;
- bool temp226372 = select681.x < d5;
+ select680 = temp221362 ? temp176 : color150361;
+ bool temp226372 = select680.x < d5;
if (! temp226372) {
break;
}
- colord19d0 = select681;
+ colord19d0 = select680;
}
- bool temp227379 = select681.x < d6;
+ bool temp227379 = select680.x < d6;
if (temp227379) {
- colord21d0 = select681;
+ colord21d0 = select680;
while (colord21d0.y < d6){
vec4 color164386 = colord21d0 + bigColor6;
colord21d0 = color164386;
@@ -3455,7 +3455,7 @@ void main()
colord23d0 = colord21d0;
}
else {
- colord22d0 = select681;
+ colord22d0 = select680;
while (colord22d0.z < d6){
float temp229398 = colord22d0.z + bigColor6.z;
vec4 temp183 = colord22d0;
@@ -3535,8 +3535,8 @@ void main()
float temp251479 = color216.x + const134;
vec4 temp205 = color216;
temp205.xz = vec2(temp251479, temp246473);
- vec4 select677 = temp247474 ? temp203 : temp205;
- colord32d0 = select677;
+ vec4 select678 = temp247474 ? temp203 : temp205;
+ colord32d0 = select678;
break;
}
@@ -3593,8 +3593,8 @@ void main()
float temp270546 = colord36d0.x + const134;
vec4 temp223 = temp216;
temp223.xz = vec2(temp270546, temp266540);
- vec4 select682 = temp267541 ? temp221 : temp223;
- colord36d0 = select682;
+ vec4 select677 = temp267541 ? temp221 : temp223;
+ colord36d0 = select677;
}
colord39d0 = colord36d0;
diff --git a/test/glslang/loopsArtificial.frag.out b/test/baseResults/loopsArtificial.frag.out
similarity index 100%
rename from test/glslang/loopsArtificial.frag.out
rename to test/baseResults/loopsArtificial.frag.out
diff --git a/test/glslang/matFun.vert.out b/test/baseResults/matFun.vert.out
similarity index 100%
rename from test/glslang/matFun.vert.out
rename to test/baseResults/matFun.vert.out
diff --git a/test/glslang/matrix.frag.out b/test/baseResults/matrix.frag.out
similarity index 100%
rename from test/glslang/matrix.frag.out
rename to test/baseResults/matrix.frag.out
diff --git a/test/glslang/matrix2.frag.out b/test/baseResults/matrix2.frag.out
similarity index 100%
rename from test/glslang/matrix2.frag.out
rename to test/baseResults/matrix2.frag.out
diff --git a/test/glslang/matrixAgg.frag.out b/test/baseResults/matrixAgg.frag.out
similarity index 100%
rename from test/glslang/matrixAgg.frag.out
rename to test/baseResults/matrixAgg.frag.out
diff --git a/test/glslang/newTexture.frag.out b/test/baseResults/newTexture.frag.out
similarity index 100%
rename from test/glslang/newTexture.frag.out
rename to test/baseResults/newTexture.frag.out
diff --git a/test/glslang/noMain.frag.out b/test/baseResults/noMain.frag.out
similarity index 100%
rename from test/glslang/noMain.frag.out
rename to test/baseResults/noMain.frag.out
diff --git a/test/glslang/precision.frag.out b/test/baseResults/precision.frag.out
similarity index 100%
rename from test/glslang/precision.frag.out
rename to test/baseResults/precision.frag.out
diff --git a/test/glslang/prepost.frag.out b/test/baseResults/prepost.frag.out
similarity index 100%
rename from test/glslang/prepost.frag.out
rename to test/baseResults/prepost.frag.out
diff --git a/test/glslang/qualifiers.frag.out b/test/baseResults/qualifiers.frag.out
similarity index 100%
rename from test/glslang/qualifiers.frag.out
rename to test/baseResults/qualifiers.frag.out
diff --git a/test/glslang/qualifiers.vert.out b/test/baseResults/qualifiers.vert.out
similarity index 100%
rename from test/glslang/qualifiers.vert.out
rename to test/baseResults/qualifiers.vert.out
diff --git a/test/glslang/simpleFunctionCall.frag.out b/test/baseResults/simpleFunctionCall.frag.out
similarity index 100%
rename from test/glslang/simpleFunctionCall.frag.out
rename to test/baseResults/simpleFunctionCall.frag.out
diff --git a/test/glslang/simpleMat.vert.out b/test/baseResults/simpleMat.vert.out
similarity index 100%
rename from test/glslang/simpleMat.vert.out
rename to test/baseResults/simpleMat.vert.out
diff --git a/test/glslang/structAssignment.frag.out b/test/baseResults/structAssignment.frag.out
similarity index 100%
rename from test/glslang/structAssignment.frag.out
rename to test/baseResults/structAssignment.frag.out
diff --git a/test/glslang/structDeref.frag.out b/test/baseResults/structDeref.frag.out
similarity index 99%
rename from test/glslang/structDeref.frag.out
rename to test/baseResults/structDeref.frag.out
index 1b7934aa..a6ea306e 100644
--- a/test/glslang/structDeref.frag.out
+++ b/test/baseResults/structDeref.frag.out
@@ -204,7 +204,7 @@ entry:
%11 = call <4 x float> @llvm.gla.fSwizzle.v4f32.f32.v4i32(float %10, <4 x i32> zeroinitializer)
%12 = load i32 addrspace(1)* @sampler, align 4, !gla.uniform !13
%13 = call <4 x float> @llvm.gla.fTextureSample.v4f32.v2f32(i32 2, i32 %12, i32 0, <2 x float> %coord1)
- %FragColor_shadow = fmul <4 x float> %11, %13
+ %FragColor_shadow = fmul <4 x float> %13, %11
call void @llvm.gla.fWriteData.v4f32(i32 1025, i32 -1, <4 x float> %FragColor_shadow), !gla.output !19
br label %stage-epilogue
@@ -327,7 +327,7 @@ void main()
float temp37 = select45 + temp36;
vec4 temp38 = vec4(temp37);
vec4 temp39 = texture(sampler, coord);
- vec4 FragColor_shadow = temp38 * temp39;
+ vec4 FragColor_shadow = temp39 * temp38;
gl_FragColor = FragColor_shadow;
}
diff --git a/test/glslang/structure.frag.out b/test/baseResults/structure.frag.out
similarity index 100%
rename from test/glslang/structure.frag.out
rename to test/baseResults/structure.frag.out
diff --git a/test/glslang/switch.frag.out b/test/baseResults/switch.frag.out
similarity index 100%
rename from test/glslang/switch.frag.out
rename to test/baseResults/switch.frag.out
diff --git a/test/glslang/swizzle.frag.out b/test/baseResults/swizzle.frag.out
similarity index 100%
rename from test/glslang/swizzle.frag.out
rename to test/baseResults/swizzle.frag.out
diff --git a/test/glslang/syntaxError.frag.out b/test/baseResults/syntaxError.frag.out
similarity index 100%
rename from test/glslang/syntaxError.frag.out
rename to test/baseResults/syntaxError.frag.out
diff --git a/test/glslang/test.frag.out b/test/baseResults/test.frag.out
similarity index 100%
rename from test/glslang/test.frag.out
rename to test/baseResults/test.frag.out
diff --git a/test/glslang/test.vert.out b/test/baseResults/test.vert.out
similarity index 100%
rename from test/glslang/test.vert.out
rename to test/baseResults/test.vert.out
diff --git a/test/glslang/texture.frag.out b/test/baseResults/texture.frag.out
similarity index 100%
rename from test/glslang/texture.frag.out
rename to test/baseResults/texture.frag.out
diff --git a/test/glslang/texture.vert.out b/test/baseResults/texture.vert.out
similarity index 100%
rename from test/glslang/texture.vert.out
rename to test/baseResults/texture.vert.out
diff --git a/test/glslang/types.frag.out b/test/baseResults/types.frag.out
similarity index 100%
rename from test/glslang/types.frag.out
rename to test/baseResults/types.frag.out
diff --git a/test/glslang/uint.frag.out b/test/baseResults/uint.frag.out
similarity index 100%
rename from test/glslang/uint.frag.out
rename to test/baseResults/uint.frag.out
diff --git a/test/glslang/uniformArray.frag.out b/test/baseResults/uniformArray.frag.out
similarity index 100%
rename from test/glslang/uniformArray.frag.out
rename to test/baseResults/uniformArray.frag.out
diff --git a/test/glslang/variableArrayIndex.frag.out b/test/baseResults/variableArrayIndex.frag.out
similarity index 100%
rename from test/glslang/variableArrayIndex.frag.out
rename to test/baseResults/variableArrayIndex.frag.out
diff --git a/test/glslang/varyingArray.frag.out b/test/baseResults/varyingArray.frag.out
similarity index 100%
rename from test/glslang/varyingArray.frag.out
rename to test/baseResults/varyingArray.frag.out
diff --git a/test/glslang/varyingArrayIndirect.frag.out b/test/baseResults/varyingArrayIndirect.frag.out
similarity index 100%
rename from test/glslang/varyingArrayIndirect.frag.out
rename to test/baseResults/varyingArrayIndirect.frag.out
diff --git a/test/glslang/voidFunction.frag.out b/test/baseResults/voidFunction.frag.out
similarity index 100%
rename from test/glslang/voidFunction.frag.out
rename to test/baseResults/voidFunction.frag.out
diff --git a/test/glslang/whileLoop.frag.out b/test/baseResults/whileLoop.frag.out
similarity index 100%
rename from test/glslang/whileLoop.frag.out
rename to test/baseResults/whileLoop.frag.out
diff --git a/test/bump b/test/bump
new file mode 100755
index 00000000..f23be33b
--- /dev/null
+++ b/test/bump
@@ -0,0 +1,2 @@
+cp localResults/* baseResults/
+
diff --git a/test/runglslang b/test/runtests
old mode 100644
new mode 100755
similarity index 84%
rename from test/runglslang
rename to test/runtests
index b47e42eb..5b0e0a2c
--- a/test/runglslang
+++ b/test/runtests
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
DESCRIPTION="\
-Description: Run the glslang test suite, record output
+Description: Run the LunarGLASS test suite, record output
"
USAGE="\
@@ -8,11 +8,8 @@ Usage: ./run [options]
Options:
-h --help Print out this Usage info
- -l --linux Run for linux
- -w --windows (default) Run for windows
-o --enable-obfuscate Do obfuscation tests
-t --testfile Run on a single test file
- -r --release Run with release build
-v --verbose Prints more info
"
@@ -96,21 +93,20 @@ function runTests {
runSingleTest $t
EXTENSION=${t##*.}
- cat temp.errout temp.stdout > glslang/$t.out.tmp
+ cat temp.errout temp.stdout > localResults/$t.out.tmp
cp temp.stdout tempglsl.$EXTENSION
runSingleTest tempglsl.$EXTENSION
- tail -5 temp.errout >> glslang/$t.out.tmp
- cat temp.stdout >> glslang/$t.out.tmp
- tr -d '\r' < glslang/$t.out.tmp > glslang/$t.out
- rm glslang/$t.out.tmp
+ tail -5 temp.errout >> localResults/$t.out.tmp
+ cat temp.stdout >> localResults/$t.out.tmp
+ tr -d '\r' < localResults/$t.out.tmp > localResults/$t.out
+ rm localResults/$t.out.tmp
rm tempglsl.$EXTENSION
done
rm temp.stdout* temp.errout
}
-# Default is for windows
-RUNCMD=../Build/Debug/glslang.exe
+RUNCMD=../build/install/bin/LunarGOO.exe
OPTIONS=(-a)
GLSL_OP="--glsl"
OBFUSCATE_OP="-f"
@@ -122,9 +118,6 @@ VERBOSE=""
# Arguments passed
while [ $# -gt 0 ]; do
case "$1" in
- -l|--linux)
- RUNCMD=./glslang.exe
- ;;
-h|--h)
showHelp
exit 0
@@ -138,9 +131,6 @@ while [ $# -gt 0 ]; do
fi
shift
;;
- -r|--release)
- RUNCMD=../Build/Release/glslang.exe
- ;;
-v|--verbose)
VERBOSE="true"
;;