Change the core of glslang to be a static library rather than a DLL.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@19952 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2012-12-13 00:09:49 +00:00
parent 9fd55bd338
commit ece0d0ca27
7 changed files with 74 additions and 47 deletions

View File

@ -22,7 +22,6 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@ -40,17 +39,16 @@
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">StandAlone\UserM_Debug\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">StandAlone\UserM_Debug\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">UserM_Release\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">UserM_Release\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">StandAlone\UserM_Release\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">StandAlone\UserM_Release\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>glslang;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;GENERIC_COMPILER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<PrecompiledHeaderOutputFile>
@ -61,16 +59,17 @@
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CallingConvention>FastCall</CallingConvention>
<CallingConvention>Cdecl</CallingConvention>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
</ClCompile>
<Link>
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>odbc32.lib;odbccp32.lib;psapi.lib;UserM_Debug\generic\glslang.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>odbc32.lib;odbccp32.lib;psapi.lib;glslang\UserM_Debug\glslang.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>UserM_Debug/StandAlone.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
</Link>
<Midl>
<TypeLibraryName>UserM_Debug/StandAlone.tlb</TypeLibraryName>
@ -97,7 +96,7 @@
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;GENERIC_COMPILER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
@ -106,18 +105,20 @@
</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>UserM_Release/</AssemblerListingLocation>
<ObjectFileName>UserM_Release/</ObjectFileName>
<ProgramDataBaseFileName>UserM_Release/Standalone</ProgramDataBaseFileName>
<ProgramDataBaseFileName>
</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CallingConvention>FastCall</CallingConvention>
<CallingConvention>Cdecl</CallingConvention>
</ClCompile>
<Link>
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>odbc32.lib;odbccp32.lib;psapi.lib;Standalone\glslang.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>UserM_Release/StandAlone.exe</OutputFile>
<AdditionalDependencies>odbc32.lib;odbccp32.lib;psapi.lib;glslang\UserM_Release\glslang.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<IgnoreSpecificDefaultLibraries>
</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>UserM_Release/StandAlone.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
@ -129,7 +130,7 @@
</Midl>
<PostBuildEvent>
<Message>move exe</Message>
<Command>xcopy /y StandAlone\UserM_Release\StandAlone.exe StandAlone</Command>
<Command>xcopy /y StandAlone\UserM_Release\StandAlone.exe test</Command>
</PostBuildEvent>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@ -137,6 +138,8 @@
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="glslang\GenericCodeGen\CodeGen.cpp" />
<ClCompile Include="glslang\GenericCodeGen\Link.cpp" />
<ClCompile Include="Standalone\StandAlone.cpp" />
</ItemGroup>
<ItemGroup>

View File

@ -10,5 +10,11 @@
<ClCompile Include="Standalone\StandAlone.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="glslang\GenericCodeGen\CodeGen.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="glslang\GenericCodeGen\Link.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -8,9 +8,31 @@ Major items to do:
- version
- stage
* Add semantics for all new grammar (1.2 through 4.3)
* Add semantics and productions for all new grammar (1.2 through 4.3)
1.2
- uniform initializers
- non-square matrices
- centroids/multisample
- gl_PointCoord
1.3
- integer ops
- integer built-in functions
- switch
- bunch of new built-ins
- noperspective
1.4
- uniform blocks
- layout qualifiers
- texture buffers
1.5
- geometry shaders
3.3
- ...
* Replace the preprocessor with a better one.
* Verify/fix thread safety of the parse context.

View File

@ -16,13 +16,12 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@ -40,18 +39,21 @@
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">glslang\UserM_Debug\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">glslang\UserM_Debug\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">UserM_Release\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">UserM_Release\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">glslang\UserM_Release\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">glslang\UserM_Release\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<PostBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PostBuildEventUseInBuild>
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.lib</TargetExt>
<TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.lib</TargetExt>
<PostBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</PostBuildEventUseInBuild>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>glslang;glslang\MachineIndependent;glslang\OSDependent\Windows;OGLCompilersDLL;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;WIN32;_CONSOLE;_USRDLL;TEST_EXPORTS;GENERIC_COMPILER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
@ -62,8 +64,10 @@
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CallingConvention>FastCall</CallingConvention>
<CallingConvention>Cdecl</CallingConvention>
<CompileAs>Default</CompileAs>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<StringPooling>true</StringPooling>
</ClCompile>
<Link>
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
@ -106,13 +110,14 @@ xcopy /y $(IntDir)$(TargetName)$(TargetExt) Test</Command>
</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>UserM_Release/</AssemblerListingLocation>
<ObjectFileName>UserM_Release/</ObjectFileName>
<ProgramDataBaseFileName>UserM_Release/glslang</ProgramDataBaseFileName>
<ProgramDataBaseFileName>
</ProgramDataBaseFileName>
<BrowseInformation>
</BrowseInformation>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CallingConvention>FastCall</CallingConvention>
<CallingConvention>Cdecl</CallingConvention>
<CompileAs>Default</CompileAs>
</ClCompile>
<Link>
@ -133,7 +138,8 @@ xcopy /y $(IntDir)$(TargetName)$(TargetExt) Test</Command>
</Midl>
<PostBuildEvent>
<Message>copy dll</Message>
<Command>xcopy /y UserM_Release\generic\glslang.* StandAlone</Command>
<Command>del Test\$(TargetName)$(TargetExt)
xcopy /y $(IntDir)$(TargetName)$(TargetExt) Test</Command>
</PostBuildEvent>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@ -164,8 +170,6 @@ xcopy /y $(IntDir)$(TargetName)$(TargetExt) Test</Command>
<ClCompile Include="glslang\MachineIndependent\preprocessor\scanner.c" />
<ClCompile Include="glslang\MachineIndependent\preprocessor\symbols.c" />
<ClCompile Include="glslang\MachineIndependent\preprocessor\tokens.c" />
<ClCompile Include="glslang\GenericCodeGen\CodeGen.cpp" />
<ClCompile Include="glslang\GenericCodeGen\Link.cpp" />
<ClCompile Include="glslang\OSDependent\Windows\main.cpp" />
<ClCompile Include="glslang\OSDependent\Windows\ossource.cpp" />
<ClCompile Include="glslang\OSDependent\Linux\ossource.cpp">

View File

@ -17,9 +17,6 @@
<Filter Include="Public">
<UniqueIdentifier>{c79e7f4d-1836-4b72-b201-46e72e4e4b6b}</UniqueIdentifier>
</Filter>
<Filter Include="Generic Code Gen">
<UniqueIdentifier>{b56dd525-2a9c-4ae5-a6b4-d024e624c6b4}</UniqueIdentifier>
</Filter>
<Filter Include="OSDependent">
<UniqueIdentifier>{d48b8f48-5784-4cb6-bead-7f98647a1c44}</UniqueIdentifier>
</Filter>
@ -91,12 +88,6 @@
<ClCompile Include="glslang\MachineIndependent\preprocessor\tokens.c">
<Filter>Machine Independent\CPP</Filter>
</ClCompile>
<ClCompile Include="glslang\GenericCodeGen\CodeGen.cpp">
<Filter>Generic Code Gen</Filter>
</ClCompile>
<ClCompile Include="glslang\GenericCodeGen\Link.cpp">
<Filter>Generic Code Gen</Filter>
</ClCompile>
<ClCompile Include="glslang\OSDependent\Windows\main.cpp">
<Filter>OSDependent\Windows</Filter>
</ClCompile>

View File

@ -58,9 +58,9 @@
// are tracked in the intermediate representation, not the symbol table.
//
#include "Include/Common.h"
#include "Include/intermediate.h"
#include "Include/InfoSink.h"
#include "../Include/Common.h"
#include "../Include/intermediate.h"
#include "../Include/InfoSink.h"
//
// Symbol base class. (Can build functions or variables out of these...)

View File

@ -38,11 +38,12 @@
#ifdef _WIN32
#define C_DECL __cdecl
#ifdef SH_EXPORTING
#define SH_IMPORT_EXPORT __declspec(dllexport)
#else
#define SH_IMPORT_EXPORT __declspec(dllimport)
#endif
//#ifdef SH_EXPORTING
// #define SH_IMPORT_EXPORT __declspec(dllexport)
//#else
// #define SH_IMPORT_EXPORT __declspec(dllimport)
//#endif
#define SH_IMPORT_EXPORT
#else
#define SH_IMPORT_EXPORT
#define __fastcall