mirror of
https://github.com/izzy2lost/PCSX2_ARM64.git
synced 2026-06-19 10:16:23 -07:00
Android project - Changed shaderc to glslang.
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
add_library(glslang
|
||||
glslang/glslang/CInterface/glslang_c_interface.cpp
|
||||
glslang/glslang/GenericCodeGen/CodeGen.cpp
|
||||
glslang/glslang/GenericCodeGen/Link.cpp
|
||||
glslang/glslang/MachineIndependent/attribute.cpp
|
||||
glslang/glslang/MachineIndependent/Constant.cpp
|
||||
glslang/glslang/MachineIndependent/glslang_tab.cpp
|
||||
glslang/glslang/MachineIndependent/InfoSink.cpp
|
||||
glslang/glslang/MachineIndependent/Initialize.cpp
|
||||
glslang/glslang/MachineIndependent/Intermediate.cpp
|
||||
glslang/glslang/MachineIndependent/intermOut.cpp
|
||||
glslang/glslang/MachineIndependent/IntermTraverse.cpp
|
||||
glslang/glslang/MachineIndependent/iomapper.cpp
|
||||
glslang/glslang/MachineIndependent/limits.cpp
|
||||
glslang/glslang/MachineIndependent/linkValidate.cpp
|
||||
glslang/glslang/MachineIndependent/parseConst.cpp
|
||||
glslang/glslang/MachineIndependent/ParseContextBase.cpp
|
||||
glslang/glslang/MachineIndependent/ParseHelper.cpp
|
||||
glslang/glslang/MachineIndependent/PoolAlloc.cpp
|
||||
glslang/glslang/MachineIndependent/preprocessor/Pp.cpp
|
||||
glslang/glslang/MachineIndependent/preprocessor/PpAtom.cpp
|
||||
glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp
|
||||
glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp
|
||||
glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp
|
||||
glslang/glslang/MachineIndependent/propagateNoContraction.cpp
|
||||
glslang/glslang/MachineIndependent/reflection.cpp
|
||||
glslang/glslang/MachineIndependent/RemoveTree.cpp
|
||||
glslang/glslang/MachineIndependent/Scan.cpp
|
||||
glslang/glslang/MachineIndependent/ShaderLang.cpp
|
||||
glslang/glslang/MachineIndependent/SpirvIntrinsics.cpp
|
||||
glslang/glslang/MachineIndependent/SymbolTable.cpp
|
||||
glslang/glslang/MachineIndependent/Versions.cpp
|
||||
glslang/OGLCompilersDLL/InitializeDll.cpp
|
||||
glslang/SPIRV/disassemble.cpp
|
||||
glslang/SPIRV/doc.cpp
|
||||
glslang/SPIRV/GlslangToSpv.cpp
|
||||
glslang/SPIRV/InReadableOrder.cpp
|
||||
glslang/SPIRV/Logger.cpp
|
||||
glslang/SPIRV/SpvBuilder.cpp
|
||||
glslang/SPIRV/SpvPostProcess.cpp
|
||||
glslang/SPIRV/SPVRemapper.cpp
|
||||
glslang/SPIRV/SpvTools.cpp
|
||||
glslang/StandAlone/ResourceLimits.cpp
|
||||
glslang/StandAlone/resource_limits_c.cpp
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
target_sources(glslang PRIVATE glslang/glslang/OSDependent/Windows/ossource.cpp)
|
||||
else()
|
||||
target_sources(glslang PRIVATE glslang/glslang/OSDependent/Unix/ossource.cpp)
|
||||
endif()
|
||||
|
||||
target_include_directories(glslang PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/glslang" "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
||||
|
||||
# Needed for macOS compile.
|
||||
set_property(TARGET glslang PROPERTY CXX_STANDARD 11)
|
||||
set_property(TARGET glslang PROPERTY CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
+147
@@ -0,0 +1,147 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(SolutionDir)common\vsprops\BaseProjectConfig.props" />
|
||||
<Import Project="$(SolutionDir)common\vsprops\WinSDK.props" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{EF6834A9-11F3-4331-BC34-21B325ABB180}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset Condition="!$(Configuration.Contains(Clang))">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
<PlatformToolset Condition="$(Configuration.Contains(Clang))">ClangCL</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization Condition="$(Configuration.Contains(Release))">true</WholeProgramOptimization>
|
||||
<UseDebugLibraries Condition="$(Configuration.Contains(Debug))">true</UseDebugLibraries>
|
||||
<UseDebugLibraries Condition="!$(Configuration.Contains(Debug))">false</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings" />
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="..\DefaultProjectRootDir.props" />
|
||||
<Import Project="..\3rdparty.props" />
|
||||
<Import Condition="$(Configuration.Contains(Debug))" Project="..\..\common\vsprops\CodeGen_Debug.props" />
|
||||
<Import Condition="$(Configuration.Contains(Devel))" Project="..\..\common\vsprops\CodeGen_Devel.props" />
|
||||
<Import Condition="$(Configuration.Contains(Release))" Project="..\..\common\vsprops\CodeGen_Release.props" />
|
||||
<Import Condition="!$(Configuration.Contains(Release))" Project="..\..\common\vsprops\IncrementalLinking.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<WarningLevel>TurnOffAllWarnings</WarningLevel>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)glslang;$(ProjectDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<LanguageStandard>stdcpp14</LanguageStandard>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="glslang\glslang\CInterface\glslang_c_interface.cpp" />
|
||||
<ClCompile Include="glslang\glslang\GenericCodeGen\CodeGen.cpp" />
|
||||
<ClCompile Include="glslang\glslang\GenericCodeGen\Link.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\attribute.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\Constant.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\glslang_tab.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\InfoSink.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\Initialize.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\Intermediate.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\intermOut.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\IntermTraverse.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\iomapper.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\limits.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\linkValidate.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\parseConst.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\ParseContextBase.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\ParseHelper.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\PoolAlloc.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\preprocessor\Pp.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\preprocessor\PpAtom.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\preprocessor\PpContext.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\preprocessor\PpScanner.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\preprocessor\PpTokens.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\propagateNoContraction.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\reflection.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\RemoveTree.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\Scan.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\ShaderLang.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\SpirvIntrinsics.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\SymbolTable.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\Versions.cpp" />
|
||||
<ClCompile Include="glslang\glslang\OSDependent\Windows\ossource.cpp" />
|
||||
<ClCompile Include="glslang\OGLCompilersDLL\InitializeDll.cpp" />
|
||||
<ClCompile Include="glslang\SPIRV\disassemble.cpp" />
|
||||
<ClCompile Include="glslang\SPIRV\doc.cpp" />
|
||||
<ClCompile Include="glslang\SPIRV\GlslangToSpv.cpp" />
|
||||
<ClCompile Include="glslang\SPIRV\InReadableOrder.cpp" />
|
||||
<ClCompile Include="glslang\SPIRV\Logger.cpp" />
|
||||
<ClCompile Include="glslang\SPIRV\SpvBuilder.cpp" />
|
||||
<ClCompile Include="glslang\SPIRV\SpvPostProcess.cpp" />
|
||||
<ClCompile Include="glslang\SPIRV\SPVRemapper.cpp" />
|
||||
<ClCompile Include="glslang\SPIRV\SpvTools.cpp" />
|
||||
<ClCompile Include="glslang\StandAlone\ResourceLimits.cpp" />
|
||||
<ClCompile Include="glslang\StandAlone\resource_limits_c.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="glslang\glslang\Include\arrays.h" />
|
||||
<ClInclude Include="glslang\glslang\Include\BaseTypes.h" />
|
||||
<ClInclude Include="glslang\glslang\Include\Common.h" />
|
||||
<ClInclude Include="glslang\glslang\Include\ConstantUnion.h" />
|
||||
<ClInclude Include="glslang\glslang\Include\glslang_c_interface.h" />
|
||||
<ClInclude Include="glslang\glslang\Include\glslang_c_shader_types.h" />
|
||||
<ClInclude Include="glslang\glslang\Include\InfoSink.h" />
|
||||
<ClInclude Include="glslang\glslang\Include\InitializeGlobals.h" />
|
||||
<ClInclude Include="glslang\glslang\Include\intermediate.h" />
|
||||
<ClInclude Include="glslang\glslang\Include\PoolAlloc.h" />
|
||||
<ClInclude Include="glslang\glslang\Include\ResourceLimits.h" />
|
||||
<ClInclude Include="glslang\glslang\Include\revision.h" />
|
||||
<ClInclude Include="glslang\glslang\Include\ShHandle.h" />
|
||||
<ClInclude Include="glslang\glslang\Include\Types.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\attribute.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\glslang_tab.cpp.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\gl_types.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\Initialize.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\iomapper.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\LiveTraverser.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\localintermediate.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\ParseHelper.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\parseVersions.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\preprocessor\PpContext.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\preprocessor\PpTokens.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\propagateNoContraction.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\reflection.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\RemoveTree.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\Scan.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\ScanContext.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\SymbolTable.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\Versions.h" />
|
||||
<ClInclude Include="glslang\glslang\OSDependent\osinclude.h" />
|
||||
<ClInclude Include="glslang\glslang\Public\ShaderLang.h" />
|
||||
<ClInclude Include="glslang\OGLCompilersDLL\InitializeDll.h" />
|
||||
<ClInclude Include="glslang\SPIRV\bitutils.h" />
|
||||
<ClInclude Include="glslang\SPIRV\disassemble.h" />
|
||||
<ClInclude Include="glslang\SPIRV\doc.h" />
|
||||
<ClInclude Include="glslang\SPIRV\GLSL.ext.AMD.h" />
|
||||
<ClInclude Include="glslang\SPIRV\GLSL.ext.EXT.h" />
|
||||
<ClInclude Include="glslang\SPIRV\GLSL.ext.KHR.h" />
|
||||
<ClInclude Include="glslang\SPIRV\GLSL.ext.NV.h" />
|
||||
<ClInclude Include="glslang\SPIRV\GLSL.std.450.h" />
|
||||
<ClInclude Include="glslang\SPIRV\GlslangToSpv.h" />
|
||||
<ClInclude Include="glslang\SPIRV\hex_float.h" />
|
||||
<ClInclude Include="glslang\SPIRV\Logger.h" />
|
||||
<ClInclude Include="glslang\SPIRV\NonSemanticDebugPrintf.h" />
|
||||
<ClInclude Include="glslang\SPIRV\spirv.hpp" />
|
||||
<ClInclude Include="glslang\SPIRV\SpvBuilder.h" />
|
||||
<ClInclude Include="glslang\SPIRV\spvIR.h" />
|
||||
<ClInclude Include="glslang\SPIRV\SPVRemapper.h" />
|
||||
<ClInclude Include="glslang\SPIRV\SpvTools.h" />
|
||||
<ClInclude Include="glslang\StandAlone\DirStackFileIncluder.h" />
|
||||
<ClInclude Include="glslang\StandAlone\ResourceLimits.h" />
|
||||
<ClInclude Include="glslang\StandAlone\resource_limits_c.h" />
|
||||
<ClInclude Include="glslang\StandAlone\Worklist.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,107 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClCompile Include="glslang\glslang\CInterface\glslang_c_interface.cpp" />
|
||||
<ClCompile Include="glslang\glslang\GenericCodeGen\Link.cpp" />
|
||||
<ClCompile Include="glslang\glslang\GenericCodeGen\CodeGen.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\ParseHelper.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\PoolAlloc.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\propagateNoContraction.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\reflection.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\RemoveTree.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\Scan.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\ShaderLang.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\SymbolTable.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\Versions.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\attribute.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\Constant.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\glslang_tab.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\InfoSink.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\Initialize.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\Intermediate.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\intermOut.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\IntermTraverse.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\limits.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\linkValidate.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\parseConst.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\ParseContextBase.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\preprocessor\PpTokens.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\preprocessor\Pp.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\preprocessor\PpAtom.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\preprocessor\PpContext.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\preprocessor\PpScanner.cpp" />
|
||||
<ClCompile Include="glslang\glslang\OSDependent\Windows\ossource.cpp" />
|
||||
<ClCompile Include="glslang\SPIRV\GlslangToSpv.cpp" />
|
||||
<ClCompile Include="glslang\SPIRV\InReadableOrder.cpp" />
|
||||
<ClCompile Include="glslang\SPIRV\Logger.cpp" />
|
||||
<ClCompile Include="glslang\SPIRV\SpvBuilder.cpp" />
|
||||
<ClCompile Include="glslang\SPIRV\SpvPostProcess.cpp" />
|
||||
<ClCompile Include="glslang\SPIRV\SPVRemapper.cpp" />
|
||||
<ClCompile Include="glslang\SPIRV\disassemble.cpp" />
|
||||
<ClCompile Include="glslang\SPIRV\doc.cpp" />
|
||||
<ClCompile Include="glslang\StandAlone\ResourceLimits.cpp" />
|
||||
<ClCompile Include="glslang\StandAlone\resource_limits_c.cpp" />
|
||||
<ClCompile Include="glslang\SPIRV\SpvTools.cpp" />
|
||||
<ClCompile Include="glslang\OGLCompilersDLL\InitializeDll.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\SpirvIntrinsics.cpp" />
|
||||
<ClCompile Include="glslang\glslang\MachineIndependent\iomapper.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="glslang\glslang\Include\glslang_c_interface.h" />
|
||||
<ClInclude Include="glslang\glslang\Include\glslang_c_shader_types.h" />
|
||||
<ClInclude Include="glslang\glslang\Include\InfoSink.h" />
|
||||
<ClInclude Include="glslang\glslang\Include\InitializeGlobals.h" />
|
||||
<ClInclude Include="glslang\glslang\Include\intermediate.h" />
|
||||
<ClInclude Include="glslang\glslang\Include\PoolAlloc.h" />
|
||||
<ClInclude Include="glslang\glslang\Include\ResourceLimits.h" />
|
||||
<ClInclude Include="glslang\glslang\Include\revision.h" />
|
||||
<ClInclude Include="glslang\glslang\Include\ShHandle.h" />
|
||||
<ClInclude Include="glslang\glslang\Include\Types.h" />
|
||||
<ClInclude Include="glslang\glslang\Include\arrays.h" />
|
||||
<ClInclude Include="glslang\glslang\Include\BaseTypes.h" />
|
||||
<ClInclude Include="glslang\glslang\Include\Common.h" />
|
||||
<ClInclude Include="glslang\glslang\Include\ConstantUnion.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\ParseHelper.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\parseVersions.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\propagateNoContraction.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\reflection.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\RemoveTree.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\Scan.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\ScanContext.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\SymbolTable.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\Versions.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\attribute.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\gl_types.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\glslang_tab.cpp.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\Initialize.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\iomapper.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\LiveTraverser.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\localintermediate.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\preprocessor\PpTokens.h" />
|
||||
<ClInclude Include="glslang\glslang\MachineIndependent\preprocessor\PpContext.h" />
|
||||
<ClInclude Include="glslang\glslang\OSDependent\osinclude.h" />
|
||||
<ClInclude Include="glslang\glslang\Public\ShaderLang.h" />
|
||||
<ClInclude Include="glslang\SPIRV\GlslangToSpv.h" />
|
||||
<ClInclude Include="glslang\SPIRV\hex_float.h" />
|
||||
<ClInclude Include="glslang\SPIRV\Logger.h" />
|
||||
<ClInclude Include="glslang\SPIRV\NonSemanticDebugPrintf.h" />
|
||||
<ClInclude Include="glslang\SPIRV\spirv.hpp" />
|
||||
<ClInclude Include="glslang\SPIRV\SpvBuilder.h" />
|
||||
<ClInclude Include="glslang\SPIRV\spvIR.h" />
|
||||
<ClInclude Include="glslang\SPIRV\SPVRemapper.h" />
|
||||
<ClInclude Include="glslang\SPIRV\bitutils.h" />
|
||||
<ClInclude Include="glslang\SPIRV\disassemble.h" />
|
||||
<ClInclude Include="glslang\SPIRV\doc.h" />
|
||||
<ClInclude Include="glslang\SPIRV\GLSL.ext.AMD.h" />
|
||||
<ClInclude Include="glslang\SPIRV\GLSL.ext.EXT.h" />
|
||||
<ClInclude Include="glslang\SPIRV\GLSL.ext.KHR.h" />
|
||||
<ClInclude Include="glslang\SPIRV\GLSL.ext.NV.h" />
|
||||
<ClInclude Include="glslang\SPIRV\GLSL.std.450.h" />
|
||||
<ClInclude Include="glslang\StandAlone\ResourceLimits.h" />
|
||||
<ClInclude Include="glslang\StandAlone\Worklist.h" />
|
||||
<ClInclude Include="glslang\StandAlone\DirStackFileIncluder.h" />
|
||||
<ClInclude Include="glslang\StandAlone\resource_limits_c.h" />
|
||||
<ClInclude Include="glslang\SPIRV\SpvTools.h" />
|
||||
<ClInclude Include="glslang\OGLCompilersDLL\InitializeDll.h" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,108 @@
|
||||
# Windows Build Configuration for AppVeyor
|
||||
# http://www.appveyor.com/docs/appveyor-yml
|
||||
|
||||
# build version format
|
||||
version: "{build}"
|
||||
|
||||
os: Visual Studio 2015
|
||||
|
||||
platform:
|
||||
- x64
|
||||
|
||||
configuration:
|
||||
- Debug
|
||||
- Release
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
# changes to these files don't need to trigger testing
|
||||
skip_commits:
|
||||
files:
|
||||
- README.md
|
||||
- README-spirv-remap.txt
|
||||
- LICENSE.txt
|
||||
- CODE_OF_CONDUCT.md
|
||||
- BUILD.*
|
||||
- WORKSPACE
|
||||
- kokoro/*
|
||||
- make-revision
|
||||
- Android.mk
|
||||
- _config.yml
|
||||
|
||||
# Travis advances the master-tot tag to current top of the tree after
|
||||
# each push into the master branch, because it relies on that tag to
|
||||
# upload build artifacts to the master-tot release. This will cause
|
||||
# double testing for each push on Appveyor: one for the push, one for
|
||||
# the tag advance. Disable testing tags.
|
||||
skip_tags: true
|
||||
|
||||
clone_depth: 5
|
||||
|
||||
matrix:
|
||||
fast_finish: true # Show final status immediately if a test fails.
|
||||
|
||||
# scripts that run after cloning repository
|
||||
install:
|
||||
- C:/Python27/python.exe update_glslang_sources.py
|
||||
- set PATH=C:\ninja;C:\Python36;%PATH%
|
||||
- git clone https://github.com/google/googletest.git External/googletest
|
||||
|
||||
build:
|
||||
parallel: true # enable MSBuild parallel builds
|
||||
verbosity: minimal
|
||||
|
||||
build_script:
|
||||
- mkdir build && cd build
|
||||
- cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_INSTALL_PREFIX=install ..
|
||||
- cmake --build . --config %CONFIGURATION% --target install
|
||||
|
||||
test_script:
|
||||
- ctest -C %CONFIGURATION% --output-on-failure
|
||||
- cd ../Test && bash runtests
|
||||
- cd ../build
|
||||
|
||||
after_test:
|
||||
# For debug build, the generated dll has a postfix "d" in its name.
|
||||
- ps: >-
|
||||
If ($env:configuration -Match "Debug") {
|
||||
$env:SUFFIX="d"
|
||||
} Else {
|
||||
$env:SUFFIX=""
|
||||
}
|
||||
- cd install
|
||||
# Zip all glslang artifacts for uploading and deploying
|
||||
- 7z a glslang-master-windows-"%PLATFORM%"-"%CONFIGURATION%".zip
|
||||
bin\glslangValidator.exe
|
||||
bin\spirv-remap.exe
|
||||
include\glslang\*
|
||||
lib\GenericCodeGen%SUFFIX%.lib
|
||||
lib\glslang%SUFFIX%.lib
|
||||
lib\glslang-default-resource-limits%SUFFIX%.lib
|
||||
lib\HLSL%SUFFIX%.lib
|
||||
lib\MachineIndependent%SUFFIX%.lib
|
||||
lib\OGLCompiler%SUFFIX%.lib
|
||||
lib\OSDependent%SUFFIX%.lib
|
||||
lib\SPIRV%SUFFIX%.lib
|
||||
lib\SPVRemapper%SUFFIX%.lib
|
||||
lib\SPIRV-Tools%SUFFIX%.lib
|
||||
lib\SPIRV-Tools-opt%SUFFIX%.lib
|
||||
|
||||
artifacts:
|
||||
- path: build\install\*.zip
|
||||
name: artifacts-zip
|
||||
|
||||
deploy:
|
||||
- provider: GitHub
|
||||
auth_token:
|
||||
secure: YglcSYdl0TylEa59H4K6lylBEDr586NAt2EMgZquSo+iuPrwgZQuJLPCoihSm9y6
|
||||
release: master-tot
|
||||
description: "Continuous build of the latest master branch by Appveyor and Travis CI"
|
||||
artifact: artifacts-zip
|
||||
draft: false
|
||||
prerelease: false
|
||||
force_update: true
|
||||
on:
|
||||
branch: master
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
@@ -0,0 +1,13 @@
|
||||
Language: Cpp
|
||||
IndentWidth: 4
|
||||
PointerAlignment: Left
|
||||
BreakBeforeBraces: Custom
|
||||
BraceWrapping: { AfterFunction: true, AfterControlStatement: false }
|
||||
IndentCaseLabels: false
|
||||
ReflowComments: false
|
||||
ColumnLimit: 120
|
||||
AccessModifierOffset: -4
|
||||
AlignTrailingComments: true
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
@@ -0,0 +1,17 @@
|
||||
# test files have a mix of lf/crlf, and that's a good thing, for testing, don't mess with it
|
||||
# bash scripts need lines ending with lf, and that's correct for Windows too, e.g., under Cygwin
|
||||
# (scripts often don't have a suffix)
|
||||
* -text
|
||||
*.sh text eof=lf
|
||||
|
||||
# txt files should be native and normalized
|
||||
*.txt text
|
||||
|
||||
# source code can be native and normalized, but simpler if lf everywhere; will try that way
|
||||
*.h text eol=lf
|
||||
*.c text eol=lf
|
||||
*.cpp text eol=lf
|
||||
*.y text eol=lf
|
||||
*.out text eol=lf
|
||||
*.conf text eol=lf
|
||||
*.err text eol=lf
|
||||
@@ -0,0 +1,20 @@
|
||||
*.o
|
||||
*.a
|
||||
*.so
|
||||
*.exe
|
||||
.vscode/
|
||||
tags
|
||||
TAGS
|
||||
bazel-*
|
||||
build/
|
||||
Test/localResults/
|
||||
External/googletest
|
||||
External/spirv-tools
|
||||
out/
|
||||
|
||||
# GN generated files
|
||||
.cipd/
|
||||
*.gclient_entries
|
||||
third_party/
|
||||
buildtools/
|
||||
tools/
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
# Copyright (C) 2020 The Khronos Group Inc.
|
||||
#
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following
|
||||
# disclaimer in the documentation and/or other materials provided
|
||||
# with the distribution.
|
||||
#
|
||||
# Neither the name of The Khronos Group Inc. nor the names of its
|
||||
# contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
buildconfig = "//build/config/BUILDCONFIG.gn"
|
||||
|
||||
default_args = {
|
||||
clang_use_chrome_plugins = false
|
||||
use_custom_libcxx = false
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
# Linux and Mac Build Configuration for Travis
|
||||
|
||||
language: cpp
|
||||
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
|
||||
# Use Ubuntu 14.04 LTS (Trusty) as the Linux testing environment.
|
||||
sudo: false
|
||||
dist: trusty
|
||||
|
||||
env:
|
||||
global:
|
||||
- secure: aGFrgzyKp+84hKrGkxVWg8cHV61uqrKEHT38gfSQK6+WS4GfLOyH83p7WnsEBb7AMhzU7LMNFdvOFr6+NaMpVnqRvc40CEG1Q+lNg9Pq9mhIZLowvDrfqTL9kQ+8Nbw5Q6/dg6CTvY7fvRfpfCEmKIUZBRkoKUuHeuM1uy3IupFcdNuL5bSYn3Beo+apSJginh9DI4BLDXFUgBzTRSLLyCX5g3cpaeGGOCr8quJlYx75W6HRck5g9SZuLtUoH9GFEV3l+ZEWB8noErW+J56L03bwNwFuuAh321evw++oQk5KFa8rlDvar3SJ3b1RHB8u/eq5DBYMyaK/fS8+Q7QbGr8diF/wDe68bKO7U9IhpNfExXmczCpExjHomW5TQv4rYdGhygPMfW97aIsPRYyNKcl4fkmb7NDrM8w0Jscdq2g5c2Kz0ItyZoBri/NXLwFQQjaVCs7Pf97TjuMA7mK0GJmDTRzi6SrDYlWMt5BQL3y0CCojyfLIRcTh0CQjQI29s97bLfQrYAxt9GNNFR+HTXRLLrkaAlJkPGEPwUywlSfEThnvHLesNxYqemolAYpQT4ithoL4GehGIHmaxsW295aKVhuRf8K9eBODNqrfblvM42UHhjntT+92ZnQ/Gkq80GqaMxnxi4PO5FyPIxt0r981b54YBkWi8YA4P7w5pNI=
|
||||
matrix:
|
||||
- GLSLANG_BUILD_TYPE=Release
|
||||
- GLSLANG_BUILD_TYPE=Debug
|
||||
|
||||
compiler:
|
||||
- clang
|
||||
- gcc
|
||||
|
||||
matrix:
|
||||
fast_finish: true # Show final status immediately if a test fails.
|
||||
exclude:
|
||||
# Skip GCC builds on Mac OS X.
|
||||
- os: osx
|
||||
compiler: gcc
|
||||
include:
|
||||
# Additional build using Android NDK.
|
||||
- env: BUILD_NDK=ON
|
||||
|
||||
cache:
|
||||
apt: true
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.6
|
||||
|
||||
install:
|
||||
# Make sure that clang-3.6 is selected on Linux.
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$CC" == "clang" ]]; then
|
||||
export CC=clang-3.6 CXX=clang++-3.6;
|
||||
fi
|
||||
# Download a recent Android NDK and use its android.toolchain.cmake file.
|
||||
- if [[ "$BUILD_NDK" == "ON" ]]; then
|
||||
export ANDROID_NDK=$HOME/android-ndk;
|
||||
git init $ANDROID_NDK;
|
||||
pushd $ANDROID_NDK;
|
||||
git remote add dneto0 https://github.com/dneto0/android-ndk.git;
|
||||
git fetch --depth=1 dneto0 r17b-strip;
|
||||
git checkout FETCH_HEAD;
|
||||
popd;
|
||||
export TOOLCHAIN_PATH=$ANDROID_NDK/build/cmake/android.toolchain.cmake;
|
||||
fi
|
||||
|
||||
before_script:
|
||||
# check out pre-breakage version of googletest; can be deleted when
|
||||
# issue 3128 is fixed
|
||||
# git clone --depth=1 https://github.com/google/googletest.git External/googletest
|
||||
- mkdir -p External/googletest
|
||||
- cd External/googletest
|
||||
- git init
|
||||
- git remote add origin https://github.com/google/googletest.git
|
||||
- git fetch --depth 1 origin 0c400f67fcf305869c5fb113dd296eca266c9725
|
||||
- git reset --hard FETCH_HEAD
|
||||
- cd ../..
|
||||
# get spirv-tools and spirv-headers
|
||||
- ./update_glslang_sources.py
|
||||
|
||||
script:
|
||||
- mkdir build && cd build
|
||||
# For Android, do release building using NDK without testing.
|
||||
# Use android-14, the oldest native API level supporeted by NDK r17b.
|
||||
# We can use newer API levels if we want.
|
||||
# For Linux and macOS, do debug/release building with testing.
|
||||
- if [[ "$BUILD_NDK" == "ON" ]]; then
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_PATH}
|
||||
-DANDROID_NATIVE_API_LEVEL=android-14
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DANDROID_ABI="armeabi-v7a with NEON"
|
||||
-DBUILD_TESTING=OFF ..;
|
||||
make -j4;
|
||||
else
|
||||
cmake -DCMAKE_BUILD_TYPE=${GLSLANG_BUILD_TYPE}
|
||||
-DCMAKE_INSTALL_PREFIX=`pwd`/install ..;
|
||||
make -j4 install;
|
||||
ctest --output-on-failure &&
|
||||
cd ../Test && ./runtests;
|
||||
fi
|
||||
|
||||
after_success:
|
||||
# For debug build, the generated dll has a postfix "d" in its name.
|
||||
- if [[ "${GLSLANG_BUILD_TYPE}" == "Debug" ]]; then
|
||||
export SUFFIX="d";
|
||||
else
|
||||
export SUFFIX="";
|
||||
fi
|
||||
# Create tarball for deployment
|
||||
- if [[ ${CC} == clang* && "${BUILD_NDK}" != "ON" ]]; then
|
||||
cd ../build/install;
|
||||
export TARBALL=glslang-master-${TRAVIS_OS_NAME}-${GLSLANG_BUILD_TYPE}.zip;
|
||||
zip ${TARBALL}
|
||||
bin/glslangValidator
|
||||
include/glslang/*
|
||||
lib/libGenericCodeGen${SUFFIX}.a
|
||||
lib/libglslang${SUFFIX}.a
|
||||
lib/libglslang-default-resource-limits${SUFFIX}.a
|
||||
lib/libHLSL${SUFFIX}.a
|
||||
lib/libMachineIndependent${SUFFIX}.a
|
||||
lib/libOGLCompiler${SUFFIX}.a
|
||||
lib/libOSDependent${SUFFIX}.a
|
||||
lib/libSPIRV${SUFFIX}.a
|
||||
lib/libSPVRemapper${SUFFIX}.a
|
||||
lib/libSPIRV-Tools${SUFFIX}.a
|
||||
lib/libSPIRV-Tools-opt${SUFFIX}.a;
|
||||
fi
|
||||
|
||||
before_deploy:
|
||||
# Tag the current top of the tree as "master-tot".
|
||||
# Travis CI replies on the tag name to properly push to GitHub Releases.
|
||||
- git config --global user.name "Travis CI"
|
||||
- git config --global user.email "builds@travis-ci.org"
|
||||
- git tag -f master-tot
|
||||
- git push -q -f https://${glslangtoken}@github.com/KhronosGroup/glslang --tags
|
||||
|
||||
deploy:
|
||||
provider: releases
|
||||
api_key: ${glslangtoken}
|
||||
on:
|
||||
branch: master
|
||||
condition: ${CC} == clang* && ${BUILD_NDK} != ON
|
||||
file: ${TARBALL}
|
||||
skip_cleanup: true
|
||||
overwrite: true
|
||||
@@ -0,0 +1,166 @@
|
||||
# Copyright (C) 2020 The Khronos Group Inc.
|
||||
#
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following
|
||||
# disclaimer in the documentation and/or other materials provided
|
||||
# with the distribution.
|
||||
#
|
||||
# Neither the name of The Khronos Group Inc. nor the names of its
|
||||
# contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
# Generate glslang/build_info.h
|
||||
GLSLANG_GENERATED_INCLUDEDIR:=$(TARGET_OUT)/include
|
||||
GLSLANG_BUILD_INFO_H:=$(GLSLANG_GENERATED_INCLUDEDIR)/glslang/build_info.h
|
||||
|
||||
define gen_glslang_build_info_h
|
||||
$(call generate-file-dir,$(GLSLANG_GENERATED_INCLUDEDIR)/dummy_filename)
|
||||
$(GLSLANG_BUILD_INFO_H): \
|
||||
$(LOCAL_PATH)/build_info.py \
|
||||
$(LOCAL_PATH)/build_info.h.tmpl \
|
||||
$(LOCAL_PATH)/CHANGES.md
|
||||
@$(HOST_PYTHON) $(LOCAL_PATH)/build_info.py \
|
||||
$(LOCAL_PATH) \
|
||||
-i $(LOCAL_PATH)/build_info.h.tmpl \
|
||||
-o $(GLSLANG_BUILD_INFO_H)
|
||||
@echo "[$(TARGET_ARCH_ABI)] Generate : $(GLSLANG_BUILD_INFO_H) <= CHANGES.md"
|
||||
endef
|
||||
$(eval $(call gen_glslang_build_info_h))
|
||||
|
||||
GLSLANG_OS_FLAGS := -DGLSLANG_OSINCLUDE_UNIX
|
||||
# AMD and NV extensions are turned on by default in upstream Glslang.
|
||||
GLSLANG_DEFINES:= -DAMD_EXTENSIONS -DNV_EXTENSIONS -DENABLE_HLSL $(GLSLANG_OS_FLAGS)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE:=OSDependent
|
||||
LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES)
|
||||
LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)
|
||||
LOCAL_SRC_FILES:=glslang/OSDependent/Unix/ossource.cpp
|
||||
LOCAL_C_INCLUDES:=$(LOCAL_PATH) $(LOCAL_PATH)/glslang/OSDependent/Unix/
|
||||
LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)/glslang/OSDependent/Unix/
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE:=OGLCompiler
|
||||
LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES)
|
||||
LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)
|
||||
LOCAL_SRC_FILES:=OGLCompilersDLL/InitializeDll.cpp
|
||||
LOCAL_C_INCLUDES:=$(LOCAL_PATH)/OGLCompiler
|
||||
LOCAL_STATIC_LIBRARIES:=OSDependent
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
# Build the stubbed HLSL library.
|
||||
# The HLSL source is now directly referenced by the glslang static library
|
||||
# instead.
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE:=HLSL
|
||||
LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES)
|
||||
LOCAL_SRC_FILES:= \
|
||||
hlsl/stub.cpp
|
||||
LOCAL_C_INCLUDES:=$(LOCAL_PATH) \
|
||||
$(LOCAL_PATH)/glslang/HLSL
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
GLSLANG_OUT_PATH=$(if $(call host-path-is-absolute,$(TARGET_OUT)),$(TARGET_OUT),$(abspath $(TARGET_OUT)))
|
||||
|
||||
# ShaderLang.cpp depends on the generated build_info.h
|
||||
$(LOCAL_PATH)/glslang/MachineIndependent/ShaderLang.cpp: \
|
||||
$(GLSLANG_BUILD_INFO_H)
|
||||
|
||||
LOCAL_MODULE:=glslang
|
||||
LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES)
|
||||
LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)
|
||||
LOCAL_SRC_FILES:= \
|
||||
glslang/GenericCodeGen/CodeGen.cpp \
|
||||
glslang/GenericCodeGen/Link.cpp \
|
||||
glslang/HLSL/hlslAttributes.cpp \
|
||||
glslang/HLSL/hlslGrammar.cpp \
|
||||
glslang/HLSL/hlslOpMap.cpp \
|
||||
glslang/HLSL/hlslParseables.cpp \
|
||||
glslang/HLSL/hlslParseHelper.cpp \
|
||||
glslang/HLSL/hlslScanContext.cpp \
|
||||
glslang/HLSL/hlslTokenStream.cpp \
|
||||
glslang/MachineIndependent/attribute.cpp \
|
||||
glslang/MachineIndependent/Constant.cpp \
|
||||
glslang/MachineIndependent/glslang_tab.cpp \
|
||||
glslang/MachineIndependent/InfoSink.cpp \
|
||||
glslang/MachineIndependent/Initialize.cpp \
|
||||
glslang/MachineIndependent/Intermediate.cpp \
|
||||
glslang/MachineIndependent/intermOut.cpp \
|
||||
glslang/MachineIndependent/IntermTraverse.cpp \
|
||||
glslang/MachineIndependent/iomapper.cpp \
|
||||
glslang/MachineIndependent/limits.cpp \
|
||||
glslang/MachineIndependent/linkValidate.cpp \
|
||||
glslang/MachineIndependent/parseConst.cpp \
|
||||
glslang/MachineIndependent/ParseContextBase.cpp \
|
||||
glslang/MachineIndependent/ParseHelper.cpp \
|
||||
glslang/MachineIndependent/PoolAlloc.cpp \
|
||||
glslang/MachineIndependent/propagateNoContraction.cpp \
|
||||
glslang/MachineIndependent/reflection.cpp \
|
||||
glslang/MachineIndependent/RemoveTree.cpp \
|
||||
glslang/MachineIndependent/Scan.cpp \
|
||||
glslang/MachineIndependent/ShaderLang.cpp \
|
||||
glslang/MachineIndependent/SpirvIntrinsics.cpp \
|
||||
glslang/MachineIndependent/SymbolTable.cpp \
|
||||
glslang/MachineIndependent/Versions.cpp \
|
||||
glslang/MachineIndependent/preprocessor/PpAtom.cpp \
|
||||
glslang/MachineIndependent/preprocessor/PpContext.cpp \
|
||||
glslang/MachineIndependent/preprocessor/Pp.cpp \
|
||||
glslang/MachineIndependent/preprocessor/PpScanner.cpp \
|
||||
glslang/MachineIndependent/preprocessor/PpTokens.cpp
|
||||
LOCAL_C_INCLUDES:=$(LOCAL_PATH) \
|
||||
$(LOCAL_PATH)/glslang/MachineIndependent \
|
||||
$(GLSLANG_GENERATED_INCLUDEDIR) \
|
||||
$(GLSLANG_OUT_PATH)
|
||||
LOCAL_STATIC_LIBRARIES:=OSDependent OGLCompiler HLSL
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
# GlslangToSpv.cpp depends on the generated build_info.h
|
||||
$(LOCAL_PATH)/SPIRV/GlslangToSpv.cpp: \
|
||||
$(GLSLANG_BUILD_INFO_H)
|
||||
|
||||
LOCAL_MODULE:=SPIRV
|
||||
LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti -Werror $(GLSLANG_DEFINES)
|
||||
LOCAL_SRC_FILES:= \
|
||||
SPIRV/GlslangToSpv.cpp \
|
||||
SPIRV/InReadableOrder.cpp \
|
||||
SPIRV/Logger.cpp \
|
||||
SPIRV/SPVRemapper.cpp \
|
||||
SPIRV/SpvBuilder.cpp \
|
||||
SPIRV/SpvPostProcess.cpp \
|
||||
SPIRV/SpvTools.cpp \
|
||||
SPIRV/disassemble.cpp \
|
||||
SPIRV/doc.cpp
|
||||
LOCAL_C_INCLUDES:=$(LOCAL_PATH) \
|
||||
$(LOCAL_PATH)/glslang/SPIRV \
|
||||
$(GLSLANG_GENERATED_INCLUDEDIR)
|
||||
LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)/glslang/SPIRV
|
||||
LOCAL_STATIC_LIBRARIES:=glslang
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
@@ -0,0 +1,309 @@
|
||||
# Copyright (C) 2020 The Khronos Group Inc.
|
||||
#
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following
|
||||
# disclaimer in the documentation and/or other materials provided
|
||||
# with the distribution.
|
||||
#
|
||||
# Neither the name of The Khronos Group Inc. nor the names of its
|
||||
# contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package(
|
||||
default_visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
# Description:
|
||||
#
|
||||
# Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator.
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
exports_files(["LICENSE"])
|
||||
|
||||
# Build information generation script
|
||||
py_binary(
|
||||
name = "build_info",
|
||||
srcs = ["build_info.py"],
|
||||
)
|
||||
|
||||
py_binary(
|
||||
name = "gen_extension_headers",
|
||||
srcs = ["gen_extension_headers.py"],
|
||||
)
|
||||
|
||||
genrule(
|
||||
name = "gen_build_info_h",
|
||||
srcs = ["CHANGES.md", "build_info.h.tmpl"],
|
||||
outs = ["glslang/build_info.h"],
|
||||
cmd_bash = "$(location build_info) $$(dirname $(location CHANGES.md)) -i $(location build_info.h.tmpl) -o $(location glslang/build_info.h)",
|
||||
cmd_bat = "for %F in ($(location CHANGES.md)) do $(location build_info) %~dpF -i $(location build_info.h.tmpl) -o $(location glslang/build_info.h)",
|
||||
tools = [":build_info"],
|
||||
)
|
||||
|
||||
genrule(
|
||||
name = "gen_extension_headers_h",
|
||||
srcs = ["glslang/ExtensionHeaders", "gen_extension_headers.py"],
|
||||
outs = ["glslang/glsl_intrinsic_header.h"],
|
||||
cmd_bash = "$(location gen_extension_headers) -i $(location glslang/ExtensionHeaders) -o $(location glslang/glsl_intrinsic_header.h)",
|
||||
tools = [":gen_extension_headers"],
|
||||
)
|
||||
|
||||
COMMON_COPTS = select({
|
||||
"@bazel_tools//src/conditions:windows": [""],
|
||||
"//conditions:default": [
|
||||
"-Wall",
|
||||
"-Wuninitialized",
|
||||
"-Wunused",
|
||||
"-Wunused-local-typedefs",
|
||||
"-Wunused-parameter",
|
||||
"-Wunused-value",
|
||||
"-Wunused-variable",
|
||||
"-Wno-reorder",
|
||||
"-std=c++11",
|
||||
"-fvisibility=hidden",
|
||||
"-fvisibility-inlines-hidden",
|
||||
"-fno-exceptions",
|
||||
"-fno-rtti",
|
||||
],
|
||||
})
|
||||
|
||||
cc_library(
|
||||
name = "glslang",
|
||||
srcs = glob(
|
||||
[
|
||||
"glslang/GenericCodeGen/*.cpp",
|
||||
"glslang/HLSL/*.cpp",
|
||||
"glslang/MachineIndependent/*.cpp",
|
||||
"glslang/MachineIndependent/preprocessor/*.cpp",
|
||||
],
|
||||
exclude = [
|
||||
"glslang/HLSL/pch.h",
|
||||
"glslang/MachineIndependent/pch.h",
|
||||
],
|
||||
) + [
|
||||
"OGLCompilersDLL/InitializeDll.cpp",
|
||||
] + select({
|
||||
"@bazel_tools//src/conditions:windows":
|
||||
["glslang/OSDependent/Windows/ossource.cpp"],
|
||||
"//conditions:default":
|
||||
["glslang/OSDependent/Unix/ossource.cpp"],
|
||||
}),
|
||||
hdrs = glob([
|
||||
"glslang/HLSL/*.h",
|
||||
"glslang/Include/*.h",
|
||||
"glslang/MachineIndependent/*.h",
|
||||
"glslang/MachineIndependent/preprocessor/*.h",
|
||||
]) + [
|
||||
"OGLCompilersDLL/InitializeDll.h",
|
||||
"StandAlone/DirStackFileIncluder.h",
|
||||
"glslang/OSDependent/osinclude.h",
|
||||
"glslang/Public/ShaderLang.h",
|
||||
":gen_build_info_h",
|
||||
],
|
||||
copts = COMMON_COPTS,
|
||||
defines = [
|
||||
"AMD_EXTENSIONS",
|
||||
"ENABLE_HLSL=0",
|
||||
"ENABLE_OPT=0",
|
||||
"NV_EXTENSIONS",
|
||||
],
|
||||
linkopts = select({
|
||||
"@bazel_tools//src/conditions:windows": [""],
|
||||
"//conditions:default": ["-lm", "-lpthread"],
|
||||
}),
|
||||
linkstatic = 1,
|
||||
)
|
||||
|
||||
genrule(
|
||||
name = "export_spirv_headers",
|
||||
srcs = [
|
||||
"SPIRV/GLSL.ext.AMD.h",
|
||||
"SPIRV/GLSL.ext.EXT.h",
|
||||
"SPIRV/GLSL.ext.KHR.h",
|
||||
"SPIRV/GLSL.ext.NV.h",
|
||||
"SPIRV/GLSL.std.450.h",
|
||||
"SPIRV/NonSemanticDebugPrintf.h",
|
||||
"SPIRV/spirv.hpp",
|
||||
],
|
||||
outs = [
|
||||
"include/SPIRV/GLSL.ext.AMD.h",
|
||||
"include/SPIRV/GLSL.ext.EXT.h",
|
||||
"include/SPIRV/GLSL.ext.KHR.h",
|
||||
"include/SPIRV/GLSL.ext.NV.h",
|
||||
"include/SPIRV/GLSL.std.450.h",
|
||||
"include/SPIRV/NonSemanticDebugPrintf.h",
|
||||
"include/SPIRV/spirv.hpp",
|
||||
],
|
||||
cmd_bash = "mkdir -p $(@D)/include/SPIRV && cp $(SRCS) $(@D)/include/SPIRV/",
|
||||
cmd_bat = "(if not exist $(@D)\\include\\SPIRV mkdir $(@D)\\include\\SPIRV) && (for %S in ($(SRCS)) do @xcopy /q %S $(@D)\\include\\SPIRV\\ >NUL)",
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "SPIRV_headers",
|
||||
hdrs = [":export_spirv_headers"],
|
||||
copts = COMMON_COPTS,
|
||||
includes = [
|
||||
"include",
|
||||
"include/SPIRV",
|
||||
],
|
||||
linkstatic = 1,
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "SPIRV",
|
||||
srcs = glob(
|
||||
["SPIRV/*.cpp"],
|
||||
exclude = [
|
||||
"SPIRV/SpvTools.cpp",
|
||||
],
|
||||
),
|
||||
hdrs = [
|
||||
"SPIRV/GlslangToSpv.h",
|
||||
"SPIRV/Logger.h",
|
||||
"SPIRV/SPVRemapper.h",
|
||||
"SPIRV/SpvBuilder.h",
|
||||
"SPIRV/SpvTools.h",
|
||||
"SPIRV/bitutils.h",
|
||||
"SPIRV/disassemble.h",
|
||||
"SPIRV/doc.h",
|
||||
"SPIRV/hex_float.h",
|
||||
"SPIRV/spvIR.h",
|
||||
],
|
||||
copts = COMMON_COPTS,
|
||||
includes = ["SPIRV"],
|
||||
linkopts = select({
|
||||
"@bazel_tools//src/conditions:windows": [""],
|
||||
"//conditions:default": ["-lm"],
|
||||
}),
|
||||
linkstatic = 1,
|
||||
deps = [
|
||||
":SPIRV_headers",
|
||||
":glslang",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "glslang-default-resource-limits",
|
||||
srcs = ["StandAlone/ResourceLimits.cpp"],
|
||||
hdrs = ["StandAlone/ResourceLimits.h"],
|
||||
copts = COMMON_COPTS,
|
||||
linkstatic = 1,
|
||||
deps = [":glslang"],
|
||||
)
|
||||
|
||||
cc_binary(
|
||||
name = "glslangValidator",
|
||||
srcs = [
|
||||
"StandAlone/StandAlone.cpp",
|
||||
"StandAlone/Worklist.h",
|
||||
":glslang/glsl_intrinsic_header.h"
|
||||
],
|
||||
copts = COMMON_COPTS,
|
||||
deps = [
|
||||
":SPIRV",
|
||||
":glslang",
|
||||
":glslang-default-resource-limits",
|
||||
],
|
||||
)
|
||||
|
||||
cc_binary(
|
||||
name = "spirv-remap",
|
||||
srcs = ["StandAlone/spirv-remap.cpp"],
|
||||
copts = COMMON_COPTS,
|
||||
deps = [
|
||||
":SPIRV",
|
||||
":glslang",
|
||||
":glslang-default-resource-limits",
|
||||
],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "test_files",
|
||||
srcs = glob(
|
||||
["Test/**"],
|
||||
exclude = [
|
||||
"Test/bump",
|
||||
"Test/glslangValidator",
|
||||
"Test/runtests",
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "glslang_test_lib",
|
||||
testonly = 1,
|
||||
srcs = [
|
||||
"gtests/HexFloat.cpp",
|
||||
"gtests/Initializer.h",
|
||||
"gtests/Settings.cpp",
|
||||
"gtests/Settings.h",
|
||||
"gtests/TestFixture.cpp",
|
||||
"gtests/TestFixture.h",
|
||||
"gtests/main.cpp",
|
||||
],
|
||||
copts = COMMON_COPTS,
|
||||
data = [":test_files"],
|
||||
defines = select({
|
||||
# Unfortunately we can't use $(location) in cc_library at the moment.
|
||||
# See https://github.com/bazelbuild/bazel/issues/1023
|
||||
# So we'll specify the path manually.
|
||||
"@bazel_tools//src/conditions:windows":
|
||||
["GLSLANG_TEST_DIRECTORY='\"../../../../../Test\"'"],
|
||||
"//conditions:default":
|
||||
["GLSLANG_TEST_DIRECTORY='\"Test\"'"],
|
||||
}),
|
||||
linkstatic = 1,
|
||||
deps = [
|
||||
":SPIRV",
|
||||
":glslang",
|
||||
":glslang-default-resource-limits",
|
||||
"@com_google_googletest//:gtest",
|
||||
],
|
||||
)
|
||||
|
||||
GLSLANG_TESTS = glob(
|
||||
["gtests/*.FromFile.cpp"],
|
||||
# Since we are not building the SPIRV-Tools dependency, the following tests
|
||||
# cannot be performed.
|
||||
exclude = [
|
||||
"gtests/Hlsl.FromFile.cpp",
|
||||
"gtests/Spv.FromFile.cpp",
|
||||
],
|
||||
)
|
||||
|
||||
[cc_test(
|
||||
name = test_file.replace("gtests/", "").replace(".FromFile.cpp", "") + "_test",
|
||||
srcs = [test_file],
|
||||
copts = COMMON_COPTS,
|
||||
data = [
|
||||
":test_files",
|
||||
],
|
||||
deps = [
|
||||
":SPIRV",
|
||||
":glslang",
|
||||
":glslang_test_lib",
|
||||
],
|
||||
) for test_file in GLSLANG_TESTS]
|
||||
+344
@@ -0,0 +1,344 @@
|
||||
# Copyright (C) 2018 Google, Inc.
|
||||
#
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following
|
||||
# disclaimer in the documentation and/or other materials provided
|
||||
# with the distribution.
|
||||
#
|
||||
# Neither the name of Google Inc. nor the names of its
|
||||
# contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import("//build_overrides/glslang.gni")
|
||||
|
||||
# Both Chromium and Fuchsia use by default a set of warning errors
|
||||
# that is far too strict to compile this project. These are also
|
||||
# typically appended after |cflags|, overriding target-specific
|
||||
# definitions. To work around this, determine which configs to
|
||||
# add and remove in order to succesfully build the project.
|
||||
if (defined(is_fuchsia_tree) && is_fuchsia_tree) {
|
||||
_configs_to_remove = [ "//build/config:default_warnings" ]
|
||||
_configs_to_add = []
|
||||
} else {
|
||||
_configs_to_remove = [ "//build/config/compiler:chromium_code" ]
|
||||
_configs_to_add = [ "//build/config/compiler:no_chromium_code" ]
|
||||
}
|
||||
|
||||
action("glslang_build_info") {
|
||||
script = "build_info.py"
|
||||
|
||||
src_dir = "."
|
||||
changes_file = "CHANGES.md"
|
||||
template_file = "build_info.h.tmpl"
|
||||
out_file = "${target_gen_dir}/include/glslang/build_info.h"
|
||||
|
||||
inputs = [
|
||||
changes_file,
|
||||
script,
|
||||
template_file,
|
||||
]
|
||||
outputs = [ out_file ]
|
||||
args = [
|
||||
rebase_path(src_dir, root_build_dir),
|
||||
"-i",
|
||||
rebase_path(template_file, root_build_dir),
|
||||
"-o",
|
||||
rebase_path(out_file, root_build_dir),
|
||||
]
|
||||
}
|
||||
|
||||
action("glslang_extension_headers") {
|
||||
script = "gen_extension_headers.py"
|
||||
|
||||
out_file = "${target_gen_dir}/include/glslang/glsl_intrinsic_header.h"
|
||||
|
||||
inputs = [
|
||||
script
|
||||
]
|
||||
outputs = [ out_file ]
|
||||
args = [
|
||||
"-i",
|
||||
rebase_path("glslang/ExtensionHeaders", root_build_dir),
|
||||
"-o",
|
||||
rebase_path(out_file, root_build_dir),
|
||||
]
|
||||
}
|
||||
|
||||
spirv_tools_dir = glslang_spirv_tools_dir
|
||||
if (!defined(glslang_angle)) {
|
||||
glslang_angle = false
|
||||
}
|
||||
|
||||
config("glslang_public") {
|
||||
include_dirs = [ "." ]
|
||||
if (!is_win || is_clang) {
|
||||
cflags = [ "-Wno-conversion" ]
|
||||
}
|
||||
}
|
||||
|
||||
config("glslang_hlsl") {
|
||||
defines = [ "ENABLE_HLSL=1" ]
|
||||
}
|
||||
|
||||
template("glslang_sources_common") {
|
||||
source_set(target_name) {
|
||||
public_configs = [ ":glslang_public" ]
|
||||
|
||||
if (invoker.enable_hlsl) {
|
||||
public_configs += [ ":glslang_hlsl" ]
|
||||
}
|
||||
|
||||
sources = [
|
||||
"OGLCompilersDLL/InitializeDll.cpp",
|
||||
"OGLCompilersDLL/InitializeDll.h",
|
||||
"SPIRV/GLSL.ext.AMD.h",
|
||||
"SPIRV/GLSL.ext.EXT.h",
|
||||
"SPIRV/GLSL.ext.KHR.h",
|
||||
"SPIRV/GLSL.ext.NV.h",
|
||||
"SPIRV/GLSL.std.450.h",
|
||||
"SPIRV/GlslangToSpv.cpp",
|
||||
"SPIRV/GlslangToSpv.h",
|
||||
"SPIRV/InReadableOrder.cpp",
|
||||
"SPIRV/Logger.cpp",
|
||||
"SPIRV/Logger.h",
|
||||
"SPIRV/NonSemanticDebugPrintf.h",
|
||||
"SPIRV/SPVRemapper.cpp",
|
||||
"SPIRV/SPVRemapper.h",
|
||||
"SPIRV/SpvBuilder.cpp",
|
||||
"SPIRV/SpvBuilder.h",
|
||||
"SPIRV/SpvPostProcess.cpp",
|
||||
"SPIRV/SpvTools.h",
|
||||
"SPIRV/bitutils.h",
|
||||
"SPIRV/disassemble.cpp",
|
||||
"SPIRV/disassemble.h",
|
||||
"SPIRV/doc.cpp",
|
||||
"SPIRV/doc.h",
|
||||
"SPIRV/hex_float.h",
|
||||
"SPIRV/spirv.hpp",
|
||||
"SPIRV/spvIR.h",
|
||||
"glslang/GenericCodeGen/CodeGen.cpp",
|
||||
"glslang/GenericCodeGen/Link.cpp",
|
||||
"glslang/Include/BaseTypes.h",
|
||||
"glslang/Include/Common.h",
|
||||
"glslang/Include/ConstantUnion.h",
|
||||
"glslang/Include/InfoSink.h",
|
||||
"glslang/Include/InitializeGlobals.h",
|
||||
"glslang/Include/PoolAlloc.h",
|
||||
"glslang/Include/ResourceLimits.h",
|
||||
"glslang/Include/ShHandle.h",
|
||||
"glslang/Include/SpirvIntrinsics.h",
|
||||
"glslang/Include/Types.h",
|
||||
"glslang/Include/arrays.h",
|
||||
"glslang/Include/intermediate.h",
|
||||
"glslang/MachineIndependent/Constant.cpp",
|
||||
"glslang/MachineIndependent/InfoSink.cpp",
|
||||
"glslang/MachineIndependent/Initialize.cpp",
|
||||
"glslang/MachineIndependent/Initialize.h",
|
||||
"glslang/MachineIndependent/IntermTraverse.cpp",
|
||||
"glslang/MachineIndependent/Intermediate.cpp",
|
||||
"glslang/MachineIndependent/LiveTraverser.h",
|
||||
"glslang/MachineIndependent/ParseContextBase.cpp",
|
||||
"glslang/MachineIndependent/ParseHelper.cpp",
|
||||
"glslang/MachineIndependent/ParseHelper.h",
|
||||
"glslang/MachineIndependent/PoolAlloc.cpp",
|
||||
"glslang/MachineIndependent/RemoveTree.cpp",
|
||||
"glslang/MachineIndependent/RemoveTree.h",
|
||||
"glslang/MachineIndependent/Scan.cpp",
|
||||
"glslang/MachineIndependent/Scan.h",
|
||||
"glslang/MachineIndependent/ScanContext.h",
|
||||
"glslang/MachineIndependent/ShaderLang.cpp",
|
||||
"glslang/MachineIndependent/SpirvIntrinsics.cpp",
|
||||
"glslang/MachineIndependent/SymbolTable.cpp",
|
||||
"glslang/MachineIndependent/SymbolTable.h",
|
||||
"glslang/MachineIndependent/Versions.cpp",
|
||||
"glslang/MachineIndependent/Versions.h",
|
||||
"glslang/MachineIndependent/attribute.cpp",
|
||||
"glslang/MachineIndependent/attribute.h",
|
||||
"glslang/MachineIndependent/gl_types.h",
|
||||
"glslang/MachineIndependent/glslang_tab.cpp",
|
||||
"glslang/MachineIndependent/glslang_tab.cpp.h",
|
||||
"glslang/MachineIndependent/intermOut.cpp",
|
||||
"glslang/MachineIndependent/iomapper.cpp",
|
||||
"glslang/MachineIndependent/iomapper.h",
|
||||
"glslang/MachineIndependent/limits.cpp",
|
||||
"glslang/MachineIndependent/linkValidate.cpp",
|
||||
"glslang/MachineIndependent/localintermediate.h",
|
||||
"glslang/MachineIndependent/parseConst.cpp",
|
||||
"glslang/MachineIndependent/parseVersions.h",
|
||||
"glslang/MachineIndependent/preprocessor/Pp.cpp",
|
||||
"glslang/MachineIndependent/preprocessor/PpAtom.cpp",
|
||||
"glslang/MachineIndependent/preprocessor/PpContext.cpp",
|
||||
"glslang/MachineIndependent/preprocessor/PpContext.h",
|
||||
"glslang/MachineIndependent/preprocessor/PpScanner.cpp",
|
||||
"glslang/MachineIndependent/preprocessor/PpTokens.cpp",
|
||||
"glslang/MachineIndependent/preprocessor/PpTokens.h",
|
||||
"glslang/MachineIndependent/propagateNoContraction.cpp",
|
||||
"glslang/MachineIndependent/propagateNoContraction.h",
|
||||
"glslang/MachineIndependent/reflection.cpp",
|
||||
"glslang/MachineIndependent/reflection.h",
|
||||
"glslang/OSDependent/osinclude.h",
|
||||
"glslang/Public/ShaderLang.h",
|
||||
]
|
||||
|
||||
# Workaround gn issue complaining about these not being allowed even though GLSLANG_HLSL is not
|
||||
# defined.
|
||||
sources += [
|
||||
"glslang/HLSL/hlslParseHelper.h",
|
||||
"glslang/HLSL/hlslParseables.h",
|
||||
"glslang/HLSL/hlslScanContext.h",
|
||||
"glslang/HLSL/hlslTokens.h",
|
||||
]
|
||||
|
||||
if (invoker.enable_hlsl) {
|
||||
sources += [
|
||||
"glslang/HLSL/hlslAttributes.cpp",
|
||||
"glslang/HLSL/hlslAttributes.h",
|
||||
"glslang/HLSL/hlslGrammar.cpp",
|
||||
"glslang/HLSL/hlslGrammar.h",
|
||||
"glslang/HLSL/hlslOpMap.cpp",
|
||||
"glslang/HLSL/hlslOpMap.h",
|
||||
"glslang/HLSL/hlslParseHelper.cpp",
|
||||
"glslang/HLSL/hlslParseables.cpp",
|
||||
"glslang/HLSL/hlslScanContext.cpp",
|
||||
"glslang/HLSL/hlslTokenStream.cpp",
|
||||
"glslang/HLSL/hlslTokenStream.h",
|
||||
]
|
||||
}
|
||||
|
||||
defines = []
|
||||
if (invoker.enable_opt) {
|
||||
sources += [ "SPIRV/SpvTools.cpp" ]
|
||||
defines += [ "ENABLE_OPT=1" ]
|
||||
}
|
||||
if (invoker.is_angle) {
|
||||
defines += [ "GLSLANG_ANGLE" ]
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
sources += [ "glslang/OSDependent/Windows/ossource.cpp" ]
|
||||
defines += [ "GLSLANG_OSINCLUDE_WIN32" ]
|
||||
} else {
|
||||
sources += [ "glslang/OSDependent/Unix/ossource.cpp" ]
|
||||
defines += [ "GLSLANG_OSINCLUDE_UNIX" ]
|
||||
}
|
||||
|
||||
if (is_clang) {
|
||||
cflags = [
|
||||
"-Wno-extra-semi",
|
||||
"-Wno-ignored-qualifiers",
|
||||
"-Wno-implicit-fallthrough",
|
||||
"-Wno-inconsistent-missing-override",
|
||||
"-Wno-missing-field-initializers",
|
||||
"-Wno-newline-eof",
|
||||
"-Wno-sign-compare",
|
||||
"-Wno-suggest-destructor-override",
|
||||
"-Wno-suggest-override",
|
||||
"-Wno-unused-variable",
|
||||
]
|
||||
}
|
||||
if (is_win && !is_clang) {
|
||||
cflags = [
|
||||
"/wd4018", # signed/unsigned mismatch
|
||||
"/wd4189", # local variable is initialized but not referenced
|
||||
]
|
||||
}
|
||||
|
||||
include_dirs = [ "${target_gen_dir}/include" ]
|
||||
|
||||
deps = [ ":glslang_build_info" ]
|
||||
|
||||
if (invoker.enable_opt) {
|
||||
deps += [
|
||||
"${spirv_tools_dir}:spvtools_opt",
|
||||
"${spirv_tools_dir}:spvtools_val",
|
||||
]
|
||||
include_dirs += [ "${spirv_tools_dir}/include" ]
|
||||
}
|
||||
|
||||
configs -= _configs_to_remove
|
||||
configs += _configs_to_add
|
||||
}
|
||||
}
|
||||
|
||||
glslang_sources_common("glslang_lib_sources") {
|
||||
enable_opt = !glslang_angle
|
||||
enable_hlsl = !glslang_angle
|
||||
is_angle = glslang_angle
|
||||
}
|
||||
|
||||
glslang_sources_common("glslang_sources") {
|
||||
enable_opt = true
|
||||
enable_hlsl = true
|
||||
is_angle = false
|
||||
}
|
||||
|
||||
source_set("glslang_default_resource_limits_sources") {
|
||||
sources = [
|
||||
"StandAlone/ResourceLimits.cpp",
|
||||
"StandAlone/ResourceLimits.h",
|
||||
"glslang/Include/ResourceLimits.h",
|
||||
]
|
||||
public_configs = [ ":glslang_public" ]
|
||||
|
||||
configs -= _configs_to_remove
|
||||
configs += _configs_to_add
|
||||
}
|
||||
|
||||
executable("glslang_validator") {
|
||||
sources = [
|
||||
"StandAlone/DirStackFileIncluder.h",
|
||||
"StandAlone/StandAlone.cpp",
|
||||
]
|
||||
if (!is_win) {
|
||||
cflags = [ "-Woverflow" ]
|
||||
}
|
||||
defines = [ "ENABLE_OPT=1" ]
|
||||
deps = [
|
||||
":glslang_build_info",
|
||||
":glslang_default_resource_limits_sources",
|
||||
":glslang_sources",
|
||||
":glslang_extension_headers",
|
||||
]
|
||||
public_configs = [ ":glslang_hlsl" ]
|
||||
|
||||
include_dirs = [
|
||||
"${target_gen_dir}/include",
|
||||
"${spirv_tools_dir}/include",
|
||||
]
|
||||
|
||||
configs -= _configs_to_remove
|
||||
configs += _configs_to_add
|
||||
}
|
||||
|
||||
executable("spirv-remap") {
|
||||
sources = [ "StandAlone/spirv-remap.cpp" ]
|
||||
defines = [ "ENABLE_OPT=1" ]
|
||||
deps = [ ":glslang_sources" ]
|
||||
|
||||
include_dirs = [ "${spirv_tools_dir}/include" ]
|
||||
|
||||
configs -= _configs_to_remove
|
||||
configs += _configs_to_add
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
# Revision history for `glslang`
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
This project adheres to [Semantic Versioning](https://semver.org/).
|
||||
|
||||
## 11.7.0 2021-11-11
|
||||
|
||||
### Other changes
|
||||
* Add support for targeting Vulkan 1.2 in the C API
|
||||
|
||||
## 11.6.0 2021-08-25
|
||||
|
||||
### Other changes
|
||||
* Atomic memory function only for shader storage block member or shared variable
|
||||
* Add support for gl_MaxVaryingVectors for ogl
|
||||
* Fix loading bool arrays from interface blocks
|
||||
* Generate separate stores for partially swizzled memory stores
|
||||
* Allow layout(std430) uniform with GL_EXT_scalar_block_layout
|
||||
* Support for pragma STDGL invariant(all)
|
||||
* Support for GL_NV_ray_tracing_motion_blur
|
||||
|
||||
## 11.5.0 2021-06-23
|
||||
|
||||
### Other changes
|
||||
* Implement GLSL_EXT_shader_atomic_float2
|
||||
* Implement GL_EXT_spirv_intrinsics
|
||||
* Fixed SPIR-V remapper not remapping OpExtInst instruction set IDs
|
||||
* only declare compatibility gl_ variables in compatibility mode
|
||||
* Add support for float spec const vector initialization
|
||||
* Implement GL_EXT_subgroup_uniform_control_flow.
|
||||
* Fix arrays dimensioned with spec constant sized gl_WorkGroupSize
|
||||
* Add support for 64bit integer scalar and vector types to bitCount() builtin
|
||||
|
||||
## 11.4.0 2021-04-22
|
||||
|
||||
### Other changes
|
||||
* Fix to keep source compatible with CMake 3.10.2
|
||||
|
||||
## 11.3.0 2021-04-21
|
||||
|
||||
### Other changes
|
||||
* Added --depfile
|
||||
* Added --auto-sampled-textures
|
||||
* Now supports InterpolateAt-based functions
|
||||
* Supports cross-stage automatic IO mapping
|
||||
* Supports GL_EXT_vulkan_glsl_relaxed (-R option)
|
||||
|
||||
## 11.2.0 2021-02-18
|
||||
|
||||
### Other changes
|
||||
* Removed Python requirement when not building with spirv-tools
|
||||
* Add support for GL_EXT_shared_memory_block
|
||||
* Implement GL_EXT_null_initializer
|
||||
* Add CMake support for Fuschia
|
||||
|
||||
## 11.1.0 2020-12-07
|
||||
|
||||
### Other changes
|
||||
* Added ray-tracing extension support
|
||||
|
||||
## 11.0.0 2020-07-20
|
||||
|
||||
### Breaking changes
|
||||
|
||||
#### Visual Studio 2013 is no longer supported
|
||||
|
||||
[As scheduled](https://github.com/KhronosGroup/glslang/blob/9eef54b2513ca6b40b47b07d24f453848b65c0df/README.md#planned-deprecationsremovals),
|
||||
Microsoft Visual Studio 2013 is no longer officially supported. Please upgrade
|
||||
to at least Visual Studio 2015.
|
||||
|
||||
## 10.15.3847 2020-07-20
|
||||
|
||||
### Breaking changes
|
||||
|
||||
* The following files have been removed:
|
||||
* `glslang/include/revision.h`
|
||||
* `glslang/include/revision.template`
|
||||
|
||||
The `GLSLANG_MINOR_VERSION` and `GLSLANG_PATCH_LEVEL` defines have been removed
|
||||
from the public headers. \
|
||||
Instead each build script now uses the new `build_info.py`
|
||||
script along with the `build_info.h.tmpl` and this `CHANGES.md` file to generate
|
||||
the glslang build-time generated header `glslang/build_info.h`.
|
||||
|
||||
The new public API to obtain the `glslang` version is `glslang::GetVersion()`.
|
||||
|
||||
### Other changes
|
||||
* `glslang` shared objects produced by CMake are now `SONAME` versioned using
|
||||
[Semantic Versioning 2.0.0](https://semver.org/).
|
||||
@@ -0,0 +1,358 @@
|
||||
# Copyright (C) 2020 The Khronos Group Inc.
|
||||
#
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following
|
||||
# disclaimer in the documentation and/or other materials provided
|
||||
# with the distribution.
|
||||
#
|
||||
# Neither the name of The Khronos Group Inc. nor the names of its
|
||||
# contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# increase to 3.1 once all major distributions
|
||||
# include a version of CMake >= 3.1
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
if (POLICY CMP0048)
|
||||
cmake_policy(SET CMP0048 NEW)
|
||||
endif()
|
||||
if(POLICY CMP0054)
|
||||
cmake_policy(SET CMP0054 NEW)
|
||||
endif()
|
||||
|
||||
project(glslang LANGUAGES CXX)
|
||||
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
# Enable compile commands database
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
# Adhere to GNU filesystem layout conventions
|
||||
include(GNUInstallDirs)
|
||||
|
||||
# Needed for CMAKE_DEPENDENT_OPTION macro
|
||||
include(CMakeDependentOption)
|
||||
|
||||
option(BUILD_SHARED_LIBS "Build Shared Libraries" OFF)
|
||||
option(BUILD_EXTERNAL "Build external dependencies in /External" ON)
|
||||
|
||||
set(LIB_TYPE STATIC)
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(LIB_TYPE SHARED)
|
||||
endif()
|
||||
|
||||
if ("${CMAKE_BUILD_TYPE}" STREQUAL "")
|
||||
# This logic inside SPIRV-Tools, which can upset build target dependencies
|
||||
# if changed after targets are already defined. To prevent these issues,
|
||||
# ensure CMAKE_BUILD_TYPE is assigned early and at the glslang root scope.
|
||||
message(STATUS "No build type selected, default to Debug")
|
||||
set(CMAKE_BUILD_TYPE "Debug")
|
||||
endif()
|
||||
|
||||
option(SKIP_GLSLANG_INSTALL "Skip installation" ${SKIP_GLSLANG_INSTALL})
|
||||
if(NOT ${SKIP_GLSLANG_INSTALL})
|
||||
set(ENABLE_GLSLANG_INSTALL ON)
|
||||
endif()
|
||||
option(ENABLE_SPVREMAPPER "Enables building of SPVRemapper" ON)
|
||||
|
||||
option(ENABLE_GLSLANG_BINARIES "Builds glslangValidator and spirv-remap" ON)
|
||||
|
||||
option(ENABLE_GLSLANG_JS
|
||||
"If using Emscripten, build glslang.js. Otherwise, builds a sample executable for binary-size testing." OFF)
|
||||
CMAKE_DEPENDENT_OPTION(ENABLE_GLSLANG_WEBMIN
|
||||
"Reduces glslang to minimum needed for web use"
|
||||
OFF "ENABLE_GLSLANG_JS"
|
||||
OFF)
|
||||
CMAKE_DEPENDENT_OPTION(ENABLE_GLSLANG_WEBMIN_DEVEL
|
||||
"For ENABLE_GLSLANG_WEBMIN builds, enables compilation error messages"
|
||||
OFF "ENABLE_GLSLANG_WEBMIN"
|
||||
OFF)
|
||||
CMAKE_DEPENDENT_OPTION(ENABLE_EMSCRIPTEN_SINGLE_FILE
|
||||
"If using Emscripten, enables SINGLE_FILE build"
|
||||
OFF "ENABLE_GLSLANG_JS AND EMSCRIPTEN"
|
||||
OFF)
|
||||
CMAKE_DEPENDENT_OPTION(ENABLE_EMSCRIPTEN_ENVIRONMENT_NODE
|
||||
"If using Emscripten, builds to run on Node instead of Web"
|
||||
OFF "ENABLE_GLSLANG_JS AND EMSCRIPTEN"
|
||||
OFF)
|
||||
|
||||
CMAKE_DEPENDENT_OPTION(ENABLE_HLSL
|
||||
"Enables HLSL input support"
|
||||
ON "NOT ENABLE_GLSLANG_WEBMIN"
|
||||
OFF)
|
||||
|
||||
option(ENABLE_RTTI "Enables RTTI" OFF)
|
||||
option(ENABLE_EXCEPTIONS "Enables Exceptions" OFF)
|
||||
option(ENABLE_OPT "Enables spirv-opt capability if present" ON)
|
||||
option(ENABLE_PCH "Enables Precompiled header" ON)
|
||||
option(ENABLE_CTEST "Enables testing" ON)
|
||||
|
||||
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND WIN32)
|
||||
set(CMAKE_INSTALL_PREFIX "install" CACHE STRING "..." FORCE)
|
||||
endif()
|
||||
|
||||
option(USE_CCACHE "Use ccache" OFF)
|
||||
if(USE_CCACHE)
|
||||
find_program(CCACHE_FOUND ccache)
|
||||
if(CCACHE_FOUND)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_CTEST)
|
||||
include(CTest)
|
||||
endif()
|
||||
|
||||
if(ENABLE_HLSL)
|
||||
add_definitions(-DENABLE_HLSL)
|
||||
endif()
|
||||
|
||||
if(ENABLE_GLSLANG_WEBMIN)
|
||||
add_definitions(-DGLSLANG_WEB)
|
||||
if(ENABLE_GLSLANG_WEBMIN_DEVEL)
|
||||
add_definitions(-DGLSLANG_WEB_DEVEL)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(CMAKE_DEBUG_POSTFIX "d")
|
||||
option(OVERRIDE_MSVCCRT "Overrides runtime of MSVC " ON)
|
||||
if(MSVC AND OVERRIDE_MSVCCRT)
|
||||
include(ChooseMSVCCRT.cmake)
|
||||
endif()
|
||||
add_definitions(-DGLSLANG_OSINCLUDE_WIN32)
|
||||
elseif(UNIX)
|
||||
add_definitions(-DGLSLANG_OSINCLUDE_UNIX)
|
||||
else()
|
||||
message("unknown platform")
|
||||
endif()
|
||||
|
||||
if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
|
||||
add_compile_options(-Wall -Wmaybe-uninitialized -Wuninitialized -Wunused -Wunused-local-typedefs
|
||||
-Wunused-parameter -Wunused-value -Wunused-variable -Wunused-but-set-parameter -Wunused-but-set-variable -fno-exceptions)
|
||||
add_compile_options(-Wno-reorder) # disable this from -Wall, since it happens all over.
|
||||
if(NOT ENABLE_RTTI)
|
||||
add_compile_options(-fno-rtti)
|
||||
endif()
|
||||
if(NOT ENABLE_EXCEPTIONS)
|
||||
add_compile_options(-fno-exceptions)
|
||||
endif()
|
||||
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0.0")
|
||||
add_compile_options(-Werror=deprecated-copy)
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_VERSION VERSION_LESS "3.13")
|
||||
# Error if there's symbols that are not found at link time.
|
||||
# add_link_options() was added in CMake 3.13 - if using an earlier
|
||||
# version don't set this - it should be caught by presubmits anyway.
|
||||
add_link_options("-Wl,--no-undefined")
|
||||
endif()
|
||||
elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND NOT MSVC)
|
||||
add_compile_options(-Wall -Wuninitialized -Wunused -Wunused-local-typedefs
|
||||
-Wunused-parameter -Wunused-value -Wunused-variable)
|
||||
add_compile_options(-Wno-reorder) # disable this from -Wall, since it happens all over.
|
||||
if(NOT ENABLE_RTTI)
|
||||
add_compile_options(-fno-rtti)
|
||||
endif()
|
||||
if(NOT ENABLE_EXCEPTIONS)
|
||||
add_compile_options(-fno-exceptions)
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_VERSION VERSION_LESS "3.13")
|
||||
# Error if there's symbols that are not found at link time.
|
||||
# add_link_options() was added in CMake 3.13 - if using an earlier
|
||||
# version don't set this - it should be caught by presubmits anyway.
|
||||
add_link_options("-Wl,-undefined,error")
|
||||
endif()
|
||||
elseif(MSVC)
|
||||
if(NOT ENABLE_RTTI)
|
||||
string(FIND "${CMAKE_CXX_FLAGS}" "/GR" MSVC_HAS_GR)
|
||||
if(MSVC_HAS_GR)
|
||||
string(REGEX REPLACE "/GR" "/GR-" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
else()
|
||||
add_compile_options(/GR-) # Disable RTTI
|
||||
endif()
|
||||
endif()
|
||||
if(ENABLE_EXCEPTIONS)
|
||||
add_compile_options(/EHsc) # Enable Exceptions
|
||||
else()
|
||||
string(REGEX REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") # Try to remove default /EHsc cxx_flag
|
||||
add_compile_options(/D_HAS_EXCEPTIONS=0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_GLSLANG_JS)
|
||||
if(MSVC)
|
||||
add_compile_options(/Os /GR-)
|
||||
else()
|
||||
add_compile_options(-Os -fno-rtti -fno-exceptions)
|
||||
if(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND NOT MSVC)
|
||||
add_compile_options(-Wno-unused-parameter)
|
||||
add_compile_options(-Wno-unused-variable -Wno-unused-const-variable)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Request C++11
|
||||
if(${CMAKE_VERSION} VERSION_LESS 3.1)
|
||||
# CMake versions before 3.1 do not understand CMAKE_CXX_STANDARD
|
||||
# remove this block once CMake >=3.1 has fixated in the ecosystem
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
else()
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
endif()
|
||||
|
||||
function(glslang_set_link_args TARGET)
|
||||
# For MinGW compiles, statically link against the GCC and C++ runtimes.
|
||||
# This avoids the need to ship those runtimes as DLLs.
|
||||
if(WIN32 AND ${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
|
||||
set_target_properties(${TARGET} PROPERTIES
|
||||
LINK_FLAGS "-static -static-libgcc -static-libstdc++")
|
||||
endif()
|
||||
endfunction(glslang_set_link_args)
|
||||
|
||||
if(NOT COMMAND find_host_package)
|
||||
macro(find_host_package)
|
||||
find_package(${ARGN})
|
||||
endmacro()
|
||||
endif()
|
||||
|
||||
# Root directory for build-time generated include files
|
||||
set(GLSLANG_GENERATED_INCLUDEDIR "${CMAKE_BINARY_DIR}/include")
|
||||
|
||||
################################################################################
|
||||
# Build version information generation
|
||||
################################################################################
|
||||
include(parse_version.cmake)
|
||||
set(GLSLANG_CHANGES_FILE "${CMAKE_CURRENT_SOURCE_DIR}/CHANGES.md")
|
||||
set(GLSLANG_BUILD_INFO_H_TMPL "${CMAKE_CURRENT_SOURCE_DIR}/build_info.h.tmpl")
|
||||
set(GLSLANG_BUILD_INFO_H "${GLSLANG_GENERATED_INCLUDEDIR}/glslang/build_info.h")
|
||||
|
||||
parse_version(${GLSLANG_CHANGES_FILE} GLSLANG)
|
||||
|
||||
function(configurate_version)
|
||||
set(major ${GLSLANG_VERSION_MAJOR})
|
||||
set(minor ${GLSLANG_VERSION_MINOR})
|
||||
set(patch ${GLSLANG_VERSION_PATCH})
|
||||
set(flavor ${GLSLANG_VERSION_FLAVOR})
|
||||
configure_file(${GLSLANG_BUILD_INFO_H_TMPL} ${GLSLANG_BUILD_INFO_H} @ONLY)
|
||||
endfunction()
|
||||
|
||||
configurate_version()
|
||||
|
||||
# glslang_add_build_info_dependency() adds the glslang-build-info dependency and
|
||||
# generated include directories to target.
|
||||
function(glslang_add_build_info_dependency target)
|
||||
target_include_directories(${target} PUBLIC $<BUILD_INTERFACE:${GLSLANG_GENERATED_INCLUDEDIR}>)
|
||||
endfunction()
|
||||
|
||||
# glslang_only_export_explicit_symbols() makes the symbol visibility hidden by
|
||||
# default for <target> when building shared libraries, and sets the
|
||||
# GLSLANG_IS_SHARED_LIBRARY define, and GLSLANG_EXPORTING to 1 when specifically
|
||||
# building <target>.
|
||||
function(glslang_only_export_explicit_symbols target)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(${target} PUBLIC "GLSLANG_IS_SHARED_LIBRARY=1")
|
||||
if(WIN32)
|
||||
target_compile_definitions(${target} PRIVATE "GLSLANG_EXPORTING=1")
|
||||
else()
|
||||
target_compile_options(${target} PRIVATE "-fvisibility=hidden")
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# glslang_pch() adds precompiled header rules to <target> for the pre-compiled
|
||||
# header file <pch>. As target_precompile_headers() was added in CMake 3.16,
|
||||
# this is a no-op if called on earlier versions of CMake.
|
||||
if(NOT CMAKE_VERSION VERSION_LESS "3.16" AND ENABLE_PCH)
|
||||
function(glslang_pch target pch)
|
||||
target_precompile_headers(${target} PRIVATE ${pch})
|
||||
endfunction()
|
||||
else()
|
||||
function(glslang_pch target pch)
|
||||
endfunction()
|
||||
if(ENABLE_PCH)
|
||||
message("Your CMake version is ${CMAKE_VERSION}. Update to at least 3.16 to enable precompiled headers to speed up incremental builds")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(BUILD_EXTERNAL AND IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/External)
|
||||
find_host_package(PythonInterp 3 REQUIRED)
|
||||
|
||||
# We depend on these for later projects, so they should come first.
|
||||
add_subdirectory(External)
|
||||
endif()
|
||||
|
||||
if(NOT TARGET SPIRV-Tools-opt)
|
||||
set(ENABLE_OPT OFF)
|
||||
endif()
|
||||
|
||||
if(ENABLE_OPT)
|
||||
message(STATUS "optimizer enabled")
|
||||
add_definitions(-DENABLE_OPT=1)
|
||||
else()
|
||||
if(ENABLE_HLSL)
|
||||
message(STATUS "spirv-tools not linked - illegal SPIRV may be generated for HLSL")
|
||||
endif()
|
||||
add_definitions(-DENABLE_OPT=0)
|
||||
endif()
|
||||
|
||||
add_subdirectory(glslang)
|
||||
add_subdirectory(OGLCompilersDLL)
|
||||
if(ENABLE_GLSLANG_BINARIES)
|
||||
add_subdirectory(StandAlone)
|
||||
endif()
|
||||
add_subdirectory(SPIRV)
|
||||
if(ENABLE_HLSL)
|
||||
add_subdirectory(hlsl)
|
||||
endif()
|
||||
if(ENABLE_CTEST)
|
||||
add_subdirectory(gtests)
|
||||
endif()
|
||||
|
||||
if(ENABLE_CTEST AND BUILD_TESTING)
|
||||
# glslang-testsuite runs a bash script on Windows.
|
||||
# Make sure to use '-o igncr' flag to ignore carriage returns (\r).
|
||||
set(IGNORE_CR_FLAG "")
|
||||
if(WIN32)
|
||||
set(IGNORE_CR_FLAG -o igncr)
|
||||
endif()
|
||||
|
||||
if (CMAKE_CONFIGURATION_TYPES)
|
||||
set(RESULTS_PATH ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>/localResults)
|
||||
set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$<CONFIGURATION>/glslangValidator)
|
||||
set(REMAP_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$<CONFIGURATION>/spirv-remap)
|
||||
else()
|
||||
set(RESULTS_PATH ${CMAKE_CURRENT_BINARY_DIR}/localResults)
|
||||
set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/glslangValidator)
|
||||
set(REMAP_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/spirv-remap)
|
||||
endif()
|
||||
|
||||
add_test(NAME glslang-testsuite
|
||||
COMMAND bash ${IGNORE_CR_FLAG} runtests ${RESULTS_PATH} ${VALIDATOR_PATH} ${REMAP_PATH}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Test/)
|
||||
endif()
|
||||
@@ -0,0 +1 @@
|
||||
A reminder that this issue tracker is managed by the Khronos Group. Interactions here should follow the Khronos Code of Conduct (https://www.khronos.org/developers/code-of-conduct), which prohibits aggressive or derogatory language. Please keep the discussion friendly and civil.
|
||||
@@ -0,0 +1,138 @@
|
||||
# Copyright (C) 2020 The Khronos Group Inc.
|
||||
#
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following
|
||||
# disclaimer in the documentation and/or other materials provided
|
||||
# with the distribution.
|
||||
#
|
||||
# Neither the name of The Khronos Group Inc. nor the names of its
|
||||
# contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# The macro choose_msvc_crt() takes a list of possible
|
||||
# C runtimes to choose from, in the form of compiler flags,
|
||||
# to present to the user. (MTd for /MTd, etc)
|
||||
#
|
||||
# The macro is invoked at the end of the file.
|
||||
#
|
||||
# CMake already sets CRT flags in the CMAKE_CXX_FLAGS_* and
|
||||
# CMAKE_C_FLAGS_* variables by default. To let the user
|
||||
# override that for each build type:
|
||||
# 1. Detect which CRT is already selected, and reflect this in
|
||||
# LLVM_USE_CRT_* so the user can have a better idea of what
|
||||
# changes they're making.
|
||||
# 2. Replace the flags in both variables with the new flag via a regex.
|
||||
# 3. set() the variables back into the cache so the changes
|
||||
# are user-visible.
|
||||
|
||||
### Helper macros: ###
|
||||
macro(make_crt_regex regex crts)
|
||||
set(${regex} "")
|
||||
foreach(crt ${${crts}})
|
||||
# Trying to match the beginning or end of the string with stuff
|
||||
# like [ ^]+ didn't work, so use a bunch of parentheses instead.
|
||||
set(${regex} "${${regex}}|(^| +)/${crt}($| +)")
|
||||
endforeach(crt)
|
||||
string(REGEX REPLACE "^\\|" "" ${regex} "${${regex}}")
|
||||
endmacro(make_crt_regex)
|
||||
|
||||
macro(get_current_crt crt_current regex flagsvar)
|
||||
# Find the selected-by-CMake CRT for each build type, if any.
|
||||
# Strip off the leading slash and any whitespace.
|
||||
string(REGEX MATCH "${${regex}}" ${crt_current} "${${flagsvar}}")
|
||||
string(REPLACE "/" " " ${crt_current} "${${crt_current}}")
|
||||
string(STRIP "${${crt_current}}" ${crt_current})
|
||||
endmacro(get_current_crt)
|
||||
|
||||
# Replaces or adds a flag to a variable.
|
||||
# Expects 'flag' to be padded with spaces.
|
||||
macro(set_flag_in_var flagsvar regex flag)
|
||||
string(REGEX MATCH "${${regex}}" current_flag "${${flagsvar}}")
|
||||
if("${current_flag}" STREQUAL "")
|
||||
set(${flagsvar} "${${flagsvar}}${${flag}}")
|
||||
else()
|
||||
string(REGEX REPLACE "${${regex}}" "${${flag}}" ${flagsvar} "${${flagsvar}}")
|
||||
endif()
|
||||
string(STRIP "${${flagsvar}}" ${flagsvar})
|
||||
# Make sure this change gets reflected in the cache/gui.
|
||||
# CMake requires the docstring parameter whenever set() touches the cache,
|
||||
# so get the existing docstring and re-use that.
|
||||
get_property(flagsvar_docs CACHE ${flagsvar} PROPERTY HELPSTRING)
|
||||
set(${flagsvar} "${${flagsvar}}" CACHE STRING "${flagsvar_docs}" FORCE)
|
||||
endmacro(set_flag_in_var)
|
||||
|
||||
|
||||
macro(choose_msvc_crt MSVC_CRT)
|
||||
if(LLVM_USE_CRT)
|
||||
message(FATAL_ERROR
|
||||
"LLVM_USE_CRT is deprecated. Use the CMAKE_BUILD_TYPE-specific
|
||||
variables (LLVM_USE_CRT_DEBUG, etc) instead.")
|
||||
endif()
|
||||
|
||||
make_crt_regex(MSVC_CRT_REGEX ${MSVC_CRT})
|
||||
|
||||
foreach(build_type ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE})
|
||||
string(TOUPPER "${build_type}" build)
|
||||
if (NOT LLVM_USE_CRT_${build})
|
||||
get_current_crt(LLVM_USE_CRT_${build}
|
||||
MSVC_CRT_REGEX
|
||||
CMAKE_CXX_FLAGS_${build})
|
||||
set(LLVM_USE_CRT_${build}
|
||||
"${LLVM_USE_CRT_${build}}"
|
||||
CACHE STRING "Specify VC++ CRT to use for ${build_type} configurations."
|
||||
FORCE)
|
||||
set_property(CACHE LLVM_USE_CRT_${build}
|
||||
PROPERTY STRINGS ;${${MSVC_CRT}})
|
||||
endif(NOT LLVM_USE_CRT_${build})
|
||||
endforeach(build_type)
|
||||
|
||||
foreach(build_type ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE})
|
||||
string(TOUPPER "${build_type}" build)
|
||||
if ("${LLVM_USE_CRT_${build}}" STREQUAL "")
|
||||
set(flag_string " ")
|
||||
else()
|
||||
set(flag_string " /${LLVM_USE_CRT_${build}} ")
|
||||
list(FIND ${MSVC_CRT} ${LLVM_USE_CRT_${build}} idx)
|
||||
if (idx LESS 0)
|
||||
message(FATAL_ERROR
|
||||
"Invalid value for LLVM_USE_CRT_${build}: ${LLVM_USE_CRT_${build}}. Valid options are one of: ${${MSVC_CRT}}")
|
||||
endif (idx LESS 0)
|
||||
message(STATUS "Using ${build_type} VC++ CRT: ${LLVM_USE_CRT_${build}}")
|
||||
endif()
|
||||
foreach(lang C CXX)
|
||||
set_flag_in_var(CMAKE_${lang}_FLAGS_${build} MSVC_CRT_REGEX flag_string)
|
||||
endforeach(lang)
|
||||
endforeach(build_type)
|
||||
endmacro(choose_msvc_crt MSVC_CRT)
|
||||
|
||||
|
||||
# List of valid CRTs for MSVC
|
||||
set(MSVC_CRT
|
||||
MD
|
||||
MDd
|
||||
MT
|
||||
MTd)
|
||||
|
||||
choose_msvc_crt(MSVC_CRT)
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
# Copyright (C) 2020 The Khronos Group Inc.
|
||||
#
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following
|
||||
# disclaimer in the documentation and/or other materials provided
|
||||
# with the distribution.
|
||||
#
|
||||
# Neither the name of The Khronos Group Inc. nor the names of its
|
||||
# contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
use_relative_paths = True
|
||||
|
||||
gclient_gn_args_file = 'build/config/gclient_args.gni'
|
||||
|
||||
vars = {
|
||||
'chromium_git': 'https://chromium.googlesource.com',
|
||||
'build_with_chromium': False,
|
||||
}
|
||||
|
||||
deps = {
|
||||
|
||||
'./build': {
|
||||
'url': '{chromium_git}/chromium/src/build.git@85ee3b7692e5284f08bd3c9459fb5685eed7b838',
|
||||
'condition': 'not build_with_chromium',
|
||||
},
|
||||
|
||||
'./buildtools': {
|
||||
'url': '{chromium_git}/chromium/src/buildtools.git@4be464e050b3d05060471788f926b34c641db9fd',
|
||||
'condition': 'not build_with_chromium',
|
||||
},
|
||||
|
||||
'./tools/clang': {
|
||||
'url': '{chromium_git}/chromium/src/tools/clang.git@3a982adabb720aa8f3e3885d40bf3fe506990157',
|
||||
'condition': 'not build_with_chromium',
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
hooks = [
|
||||
{
|
||||
'name': 'sysroot_x64',
|
||||
'pattern': '.',
|
||||
'condition': 'checkout_linux and (checkout_x64 and not build_with_chromium)',
|
||||
'action': ['python', './build/linux/sysroot_scripts/install-sysroot.py',
|
||||
'--arch=x64'],
|
||||
},
|
||||
{
|
||||
# Note: On Win, this should run after win_toolchain, as it may use it.
|
||||
'name': 'clang',
|
||||
'pattern': '.',
|
||||
'action': ['python', './tools/clang/scripts/update.py'],
|
||||
'condition': 'not build_with_chromium',
|
||||
},
|
||||
]
|
||||
|
||||
recursedeps = [
|
||||
# buildtools provides clang_format, libc++, and libc++abi
|
||||
'buildtools',
|
||||
]
|
||||
@@ -0,0 +1,77 @@
|
||||
# Copyright (C) 2020 The Khronos Group Inc.
|
||||
#
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following
|
||||
# disclaimer in the documentation and/or other materials provided
|
||||
# with the distribution.
|
||||
#
|
||||
# Neither the name of The Khronos Group Inc. nor the names of its
|
||||
# contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# Suppress all warnings from external projects.
|
||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_OPTIONS -w)
|
||||
|
||||
if(BUILD_TESTING)
|
||||
if(TARGET gmock)
|
||||
message(STATUS "Google Mock already configured - use it")
|
||||
elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/googletest)
|
||||
# We need to make sure Google Test does not mess up with the
|
||||
# global CRT settings on Windows.
|
||||
if(WIN32)
|
||||
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||
endif(WIN32)
|
||||
# EXCLUDE_FROM_ALL keeps the install target from installing GTEST files.
|
||||
add_subdirectory(googletest EXCLUDE_FROM_ALL)
|
||||
set(GTEST_TARGETS
|
||||
gtest
|
||||
gtest_main
|
||||
gmock
|
||||
gmock_main)
|
||||
foreach(target ${GTEST_TARGETS})
|
||||
set_property(TARGET ${target} PROPERTY FOLDER gtest)
|
||||
endforeach()
|
||||
mark_as_advanced(gmock_build_tests
|
||||
BUILD_GMOCK
|
||||
BUILD_GTEST
|
||||
BUILD_SHARED_LIBS
|
||||
gtest_build_samples
|
||||
gtest_build_tests
|
||||
gtest_disable_pthreads
|
||||
gtest_force_shared_crt
|
||||
gtest_hide_internal_symbols)
|
||||
else()
|
||||
message(STATUS
|
||||
"Google Mock was not found - tests based on that will not build")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_OPT AND NOT TARGET SPIRV-Tools-opt)
|
||||
if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/spirv-tools)
|
||||
set(SPIRV_SKIP_TESTS ON CACHE BOOL "Skip building SPIRV-Tools tests")
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/spirv-tools spirv-tools)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -0,0 +1,384 @@
|
||||
Here, glslang proper means core GLSL parsing, HLSL parsing, and SPIR-V code
|
||||
generation. Glslang proper requires use of a number of licenses, one that covers
|
||||
preprocessing and others that covers non-preprocessing.
|
||||
|
||||
Bison was removed long ago. You can build glslang from the source grammar,
|
||||
using tools of your choice, without using bison or any bison files.
|
||||
|
||||
Other parts, outside of glslang proper, include:
|
||||
|
||||
- gl_types.h, only needed for OpenGL-like reflection, and can be left out of
|
||||
a parse and codegen project. See it for its license.
|
||||
|
||||
- update_glslang_sources.py, which is not part of the project proper and does
|
||||
not need to be used.
|
||||
|
||||
- the SPIR-V "remapper", which is optional, but has the same license as
|
||||
glslang proper
|
||||
|
||||
- Google tests and SPIR-V tools, and anything in the external subdirectory
|
||||
are external and optional; see them for their respective licenses.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
The core of glslang-proper, minus the preprocessor is licenced as follows:
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
3-Clause BSD License
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
//
|
||||
// Copyright (C) 2015-2018 Google, Inc.
|
||||
// Copyright (C) <various other dates and companies>
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
//
|
||||
// Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following
|
||||
// disclaimer in the documentation and/or other materials provided
|
||||
// with the distribution.
|
||||
//
|
||||
// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
2-Clause BSD License
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Copyright 2020 The Khronos Group Inc
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
The MIT License
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Copyright 2020 The Khronos Group Inc
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
APACHE LICENSE, VERSION 2.0
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
GPL 3 with special bison exception
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Bison implementation for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
As a special exception, you may create a larger work that contains
|
||||
part or all of the Bison parser skeleton and distribute that work
|
||||
under terms of your choice, so long as that work isn't itself a
|
||||
parser generator using the skeleton or a modified version thereof
|
||||
as a parser skeleton. Alternatively, if you modify or redistribute
|
||||
the parser skeleton itself, you may (at your option) remove this
|
||||
special exception, which will cause the skeleton and the resulting
|
||||
Bison output files to be licensed under the GNU General Public
|
||||
License without this special exception.
|
||||
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
================================================================================
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
The preprocessor has the core licenses stated above, plus an additional licence:
|
||||
|
||||
/****************************************************************************\
|
||||
Copyright (c) 2002, NVIDIA Corporation.
|
||||
|
||||
NVIDIA Corporation("NVIDIA") supplies this software to you in
|
||||
consideration of your agreement to the following terms, and your use,
|
||||
installation, modification or redistribution of this NVIDIA software
|
||||
constitutes acceptance of these terms. If you do not agree with these
|
||||
terms, please do not use, install, modify or redistribute this NVIDIA
|
||||
software.
|
||||
|
||||
In consideration of your agreement to abide by the following terms, and
|
||||
subject to these terms, NVIDIA grants you a personal, non-exclusive
|
||||
license, under NVIDIA's copyrights in this original NVIDIA software (the
|
||||
"NVIDIA Software"), to use, reproduce, modify and redistribute the
|
||||
NVIDIA Software, with or without modifications, in source and/or binary
|
||||
forms; provided that if you redistribute the NVIDIA Software, you must
|
||||
retain the copyright notice of NVIDIA, this notice and the following
|
||||
text and disclaimers in all such redistributions of the NVIDIA Software.
|
||||
Neither the name, trademarks, service marks nor logos of NVIDIA
|
||||
Corporation may be used to endorse or promote products derived from the
|
||||
NVIDIA Software without specific prior written permission from NVIDIA.
|
||||
Except as expressly stated in this notice, no other rights or licenses
|
||||
express or implied, are granted by NVIDIA herein, including but not
|
||||
limited to any patent rights that may be infringed by your derivative
|
||||
works or by other works in which the NVIDIA Software may be
|
||||
incorporated. No hardware is licensed hereunder.
|
||||
|
||||
THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
|
||||
WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED,
|
||||
INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE,
|
||||
NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
|
||||
ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER
|
||||
PRODUCTS.
|
||||
|
||||
IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT,
|
||||
INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
||||
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY
|
||||
OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE
|
||||
NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT,
|
||||
TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF
|
||||
NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
\****************************************************************************/
|
||||
@@ -0,0 +1,48 @@
|
||||
# Copyright (C) 2020 The Khronos Group Inc.
|
||||
#
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following
|
||||
# disclaimer in the documentation and/or other materials provided
|
||||
# with the distribution.
|
||||
#
|
||||
# Neither the name of The Khronos Group Inc. nor the names of its
|
||||
# contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
set(SOURCES InitializeDll.cpp InitializeDll.h)
|
||||
|
||||
add_library(OGLCompiler STATIC ${SOURCES})
|
||||
set_property(TARGET OGLCompiler PROPERTY FOLDER glslang)
|
||||
set_property(TARGET OGLCompiler PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
if(WIN32)
|
||||
source_group("Source" FILES ${SOURCES})
|
||||
endif(WIN32)
|
||||
|
||||
if(ENABLE_GLSLANG_INSTALL)
|
||||
install(TARGETS OGLCompiler EXPORT OGLCompilerTargets
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(EXPORT OGLCompilerTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
|
||||
endif(ENABLE_GLSLANG_INSTALL)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user