Added the shader compiler to the fastbuild pipeline.
This commit is contained in:
@@ -0,0 +1,100 @@
|
||||
.ProjectName = 'JulietShaderCompiler'
|
||||
.ProjectPath = 'JulietShaderCompiler'
|
||||
|
||||
// 1. Define the configurations and a container for the VS Project
|
||||
.ShaderCompilerConfigs = { .X64ClangDebugConfig, .X64ClangReleaseConfig }
|
||||
.ProjectConfigsShader = {}
|
||||
.DXCSourcePath = '$ProjectPath$/DXShaderCompiler'
|
||||
|
||||
ForEach( .BuildConfig in .ShaderCompilerConfigs )
|
||||
{
|
||||
Using( .BuildConfig )
|
||||
.OutputBase + '\$Platform$-$BuildConfigName$'
|
||||
|
||||
// 2. Define the Build Targets for this specific configuration
|
||||
ObjectList( '$ProjectName$-Obs-$Platform$-$BuildConfigName$' )
|
||||
{
|
||||
.CompilerInputPath = '$ProjectPath$/'
|
||||
.CompilerOutputPath = '$OutputBase$/$ProjectPath$/'
|
||||
.CompilerOptions + ' "-IJuliet/include"'
|
||||
+ ' "-IJulietShaderCompiler"'
|
||||
|
||||
#if __WINDOWS__
|
||||
.CompilerOptions + ' -DJULIET_WIN32'
|
||||
#endif
|
||||
}
|
||||
|
||||
#if __WINDOWS__
|
||||
Copy( '$ProjectName$-CopyDeps-$Platform$-$BuildConfigName$' )
|
||||
{
|
||||
.Source = {
|
||||
'$DXCSourcePath$/dxcompiler.dll',
|
||||
'$DXCSourcePath$/dxil.dll'
|
||||
}
|
||||
.Dest = '$BinPath$/$Platform$-$BuildConfigName$/'
|
||||
}
|
||||
#endif
|
||||
|
||||
Executable( '$ProjectName$-Exe-$Platform$-$BuildConfigName$' )
|
||||
{
|
||||
.Libraries = {
|
||||
'Juliet-Lib-$Platform$-$BuildConfigName$',
|
||||
'$ProjectName$-Obs-$Platform$-$BuildConfigName$'
|
||||
}
|
||||
|
||||
.LinkerOutput = '$BinPath$/$Platform$-$BuildConfigName$/$ProjectName$$ExeExtension$'
|
||||
|
||||
#if __WINDOWS__
|
||||
|
||||
.CRTLibs = .CRTLibs_Dynamic
|
||||
If ( .BuildConfigName == 'Debug' )
|
||||
{
|
||||
^CRTLibs = .CRTLibs_DynamicDebug
|
||||
}
|
||||
.LinkerOptions + .CRTLibs
|
||||
|
||||
.LinkerOptions + .CommonWinLibs + ' dxcompiler.lib'
|
||||
#endif
|
||||
|
||||
#if __WINDOWS__
|
||||
.PreBuildDependencies = { '$ProjectName$-CopyDeps-$Platform$-$BuildConfigName$' }
|
||||
#endif
|
||||
}
|
||||
|
||||
Alias( '$ProjectName$-$Platform$-$BuildConfigName$' ) { .Targets = '$ProjectName$-Exe-$Platform$-$BuildConfigName$' }
|
||||
^'Targets_$Platform$_$BuildConfigName$' + { '$ProjectName$-$Platform$-$BuildConfigName$' }
|
||||
|
||||
#if __WINDOWS__
|
||||
.ConfigInfo =
|
||||
[
|
||||
Using( .'Project_$Platform$_$BuildConfigName$' )
|
||||
|
||||
.LocalDebuggerCommandArguments = '..\..\Assets\source\SolidColor.frag.hlsl -o ..\..\Assets\compiled\SolidColor.frag.dxil'
|
||||
|
||||
.Target = '$ProjectName$-$Config$'
|
||||
]
|
||||
^ProjectConfigsShader + .ConfigInfo
|
||||
#endif
|
||||
}
|
||||
|
||||
// 4. Create the Project and Solution using the generated list
|
||||
VCXProject( '$ProjectName$-Proj' )
|
||||
{
|
||||
.ProjectOutput = '$ProjectPath$/$ProjectName$.vcxproj'
|
||||
.ProjectBasePath = '$ProjectPath$/'
|
||||
.ProjectInputPaths = { .ProjectBasePath }
|
||||
.ProjectConfigs = .ProjectConfigsShader
|
||||
}
|
||||
|
||||
VSSolution( 'ShaderCompiler-Solution' )
|
||||
{
|
||||
.SolutionOutput = 'JulietShaderCompiler.sln'
|
||||
.SolutionProjects = { '$ProjectName$-Proj' , 'Juliet' }
|
||||
.SolutionConfigs = .ProjectConfigsShader
|
||||
.SolutionBuildProject = '$ProjectName$-Proj'
|
||||
}
|
||||
|
||||
// 5. Global Aliases
|
||||
Alias( 'gen-shader' ) { .Targets = 'ShaderCompiler-Solution' }
|
||||
Alias( 'shader' ) { .Targets = { '$ProjectName$-x64Clang-Release' } }
|
||||
Alias( 'shader-debug' ) { .Targets = { '$ProjectName$-x64Clang-Debug', } }
|
||||
@@ -1,119 +1,86 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{26880364-45F4-4817-BFD3-0ACC0958757D}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>JulietShaderCompiler</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.26100.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
||||
<PropertyGroup>
|
||||
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>ClangCL</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform"/>
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros"/>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)\bin\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)Intermediate\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)\bin\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)Intermediate\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)Juliet\include\;$(SolutionDir)JulietShaderCompiler;</AdditionalIncludeDirectories>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)\lib\$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>Juliet.lib; $(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)\lib\$(Platform)\$(Configuration)\;</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>Juliet.lib; $(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp"/>
|
||||
<ClCompile Include="ShaderCompiler.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CopyFileToFolders Include="DXShaderCompiler\dxcompiler.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</CopyFileToFolders>
|
||||
<CopyFileToFolders Include="DXShaderCompiler\dxil.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</CopyFileToFolders>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="DXShaderCompiler\DXCompiler.h" />
|
||||
<ClInclude Include="ShaderCompiler.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="x64Clang-Debug|x64">
|
||||
<Configuration>x64Clang-Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="x64Clang-Release|x64">
|
||||
<Configuration>x64Clang-Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="DXShaderCompiler\DXCompiler.h" />
|
||||
<CustomBuild Include="JulietShaderCompiler.bff" />
|
||||
<CustomBuild Include="main.cpp" />
|
||||
<CustomBuild Include="ShaderCompiler.cpp" />
|
||||
<CustomBuild Include="ShaderCompiler.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{534b94ed-6c94-4f93-bc2a-7f5284b7d434}</ProjectGuid>
|
||||
<Keyword>MakeFileProj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Makefile</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<LocalDebuggerCommandArguments>..\..\Assets\source\SolidColor.frag.hlsl -o ..\..\Assets\compiled\SolidColor.frag.dxil</LocalDebuggerCommandArguments>
|
||||
<LocalDebuggerCommand>$(SolutionDir)\bin\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Makefile</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<LocalDebuggerCommandArguments>..\..\Assets\source\SolidColor.frag.hlsl -o ..\..\Assets\compiled\SolidColor.frag.dxil</LocalDebuggerCommandArguments>
|
||||
<LocalDebuggerCommand>$(SolutionDir)\bin\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='x64Clang-Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='x64Clang-Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Debug|x64'">
|
||||
<NMakeBuildCommandLine>cd $(SolutionDir) & misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>cd $(SolutionDir) & misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
|
||||
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;DEBUG;PROFILING_ENABLED;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
|
||||
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
|
||||
<AdditionalOptions>/std:c++20 </AdditionalOptions>
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
|
||||
<IntDir>$(SolutionDir)\Intermediate</IntDir>
|
||||
<OutDir>$(SolutionDir)\bin</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Release|x64'">
|
||||
<NMakeBuildCommandLine>cd $(SolutionDir) & misc\fbuild -ide -dist -monitor -cache $(ProjectName)-$(Configuration)</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>cd $(SolutionDir) & misc\fbuild -ide -dist -monitor -cache -clean $(ProjectName)-$(Configuration)</NMakeReBuildCommandLine>
|
||||
<NMakePreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;WIN32_LEAN_AND_MEAN;WIN32;_WIN32;__WINDOWS__;_HAS_EXCEPTIONS=0;WIN64;RELEASE;JULIET_EXPORT;JULIET_WIN32;</NMakePreprocessorDefinitions>
|
||||
<NMakeIncludeSearchPath>..\;..\Juliet\include;..\Juliet\src;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;</NMakeIncludeSearchPath>
|
||||
<AdditionalOptions>/std:c++20 </AdditionalOptions>
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)\bin\$(Configuration)\</LocalDebuggerWorkingDirectory>
|
||||
<IntDir>$(SolutionDir)\Intermediate</IntDir>
|
||||
<OutDir>$(SolutionDir)\bin</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Debug|x64'">
|
||||
<BuildLog>
|
||||
<Path>$(SolutionDir)\Intermediate\$(ProjectName)-$(Configuration).log</Path>
|
||||
</BuildLog>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='x64Clang-Release|x64'">
|
||||
<BuildLog>
|
||||
<Path>$(SolutionDir)\Intermediate\$(ProjectName)-$(Configuration).log</Path>
|
||||
</BuildLog>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
<Import Condition="'$(ConfigurationType)' == 'Makefile' and Exists('$(VCTargetsPath)\Platforms\$(Platform)\SCE.Makefile.$(Platform).targets')" Project="$(VCTargetsPath)\Platforms\$(Platform)\SCE.Makefile.$(Platform).targets" />
|
||||
<Import Condition="'$(ConfigurationType)' == 'Makefile' and '$(AndroidAPILevel)' != '' and Exists('$(VCTargetsPath)\Application Type\$(ApplicationType)\$(ApplicationTypeRevision)\Android.Common.targets')" Project="$(VCTargetsPath)\Application Type\$(ApplicationType)\$(ApplicationTypeRevision)\Android.Common.targets" />
|
||||
</Project>
|
||||
@@ -1,22 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<CustomBuild Include="DXShaderCompiler\DXCompiler.h">
|
||||
<Filter>DXShaderCompiler</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="JulietShaderCompiler.bff">
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="main.cpp">
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="ShaderCompiler.cpp">
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="ShaderCompiler.h">
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="JulietShaderCompiler.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<Filter Include="DXShaderCompiler">
|
||||
<UniqueIdentifier>{9f537123-6c94-4f93-bc2a-7f5284b7d434}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -6,8 +6,6 @@
|
||||
#include <Core/Memory/Allocator.h>
|
||||
#include <DXShaderCompiler/DXCompiler.h>
|
||||
|
||||
#pragma comment(lib, "dxcompiler.lib")
|
||||
|
||||
using namespace Juliet;
|
||||
|
||||
namespace
|
||||
@@ -66,7 +64,8 @@ namespace
|
||||
char inplaceBuffer[1024];
|
||||
convertedBuffer.Data = inplaceBuffer;
|
||||
convertedBuffer.Capacity = sizeof(inplaceBuffer);
|
||||
if (!ConvertString(StringEncoding::UTF8, StringEncoding::UTF16, info.EntryPoint, convertedBuffer))
|
||||
constexpr bool kAddNullTerminator = true;
|
||||
if (!ConvertString(StringEncoding::UTF8, StringEncoding::UTF16, info.EntryPoint, convertedBuffer, kAddNullTerminator))
|
||||
{
|
||||
LogError(LogCategory::Tool, "Cannot convert entry point string to utf16");
|
||||
return {};
|
||||
@@ -130,7 +129,7 @@ namespace
|
||||
StringBuffer nameUtf16 = {};
|
||||
nameUtf16.Data = nameInplaceBuffer;
|
||||
nameUtf16.Capacity = sizeof(nameInplaceBuffer);
|
||||
if (ConvertString(StringEncoding::UTF8, StringEncoding::UTF16, info.Name, nameUtf16))
|
||||
if (ConvertString(StringEncoding::UTF8, StringEncoding::UTF16, info.Name, nameUtf16, kAddNullTerminator))
|
||||
{
|
||||
args[argCount++] = reinterpret_cast<LPCWSTR>(nameInplaceBuffer);
|
||||
}
|
||||
|
||||
@@ -39,4 +39,4 @@ struct HLSLShaderInfo : ShaderInfo
|
||||
// TODO Defines and includes
|
||||
};
|
||||
|
||||
ByteBuffer CompileDXIL(HLSLShaderInfo& info);
|
||||
ByteBuffer CompileDXIL(HLSLShaderInfo& info);
|
||||
|
||||
Reference in New Issue
Block a user