Skip to content

Commit

Permalink
Better automated FSR2 building
Browse files Browse the repository at this point in the history
  • Loading branch information
CompulsiveComputing committed Jul 1, 2023
1 parent ed26913 commit 12fa404
Show file tree
Hide file tree
Showing 5 changed files with 196 additions and 2 deletions.
4 changes: 2 additions & 2 deletions BuildFSR2.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ call GenerateSolutions.bat > nul 2>&1

REM Build FSR2_Sample_DX12.sln
call :BuildSolution "%origin%%buildPath%\DX12\%slnDX12%" "Debug" "DX12"
call :BuildSolution "%origin%%buildPath%\DX12\%slnDX12%" "Release" "DX12"
call :BuildSolution "%origin%%buildPath%\DX12\%slnDX12%" "RelWithDebInfo" "DX12"

REM Build FSR2_Sample_VK.sln
call :BuildSolution "%origin%%buildPath%\VK\%slnVK%" "Debug" "VK"
call :BuildSolution "%origin%%buildPath%\VK\%slnVK%" "Release" "VK"
call :BuildSolution "%origin%%buildPath%\VK\%slnVK%" "RelWithDebInfo" "VK"

cd /d "%origin%"
goto :endofBuildFSR2
Expand Down
138 changes: 138 additions & 0 deletions Build_FSR2/Build_FSR2.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<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>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{e61bcfc0-bc33-46d1-a144-9021fef7f6bc}</ProjectGuid>
<RootNamespace>BuildFSR2</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</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|Win32'">
<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|Win32'">
<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)'=='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" />

<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>

<ItemGroup></ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
17 changes: 17 additions & 0 deletions Build_FSR2/Build_FSR2.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?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;c++;cppm;ixx;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;h++;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>
</ItemGroup>
</Project>
33 changes: 33 additions & 0 deletions CyberFSR.sln
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,56 @@ Microsoft Visual Studio Solution File, Format Version 12.00
VisualStudioVersion = 17.2.32602.215
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CyberFSR", "CyberFSR\CyberFSR.vcxproj", "{8D2B73FB-EECD-45CE-B8E5-335610462F58}"
ProjectSection(ProjectDependencies) = postProject
{E61BCFC0-BC33-46D1-A144-9021FEF7F6BC} = {E61BCFC0-BC33-46D1-A144-9021FEF7F6BC}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Build_FSR2", "Build_FSR2\Build_FSR2.vcxproj", "{E61BCFC0-BC33-46D1-A144-9021FEF7F6BC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
MinSizeRel|x64 = MinSizeRel|x64
MinSizeRel|x86 = MinSizeRel|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
RelWithDebInfo|x64 = RelWithDebInfo|x64
RelWithDebInfo|x86 = RelWithDebInfo|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8D2B73FB-EECD-45CE-B8E5-335610462F58}.Debug|x64.ActiveCfg = Debug|x64
{8D2B73FB-EECD-45CE-B8E5-335610462F58}.Debug|x64.Build.0 = Debug|x64
{8D2B73FB-EECD-45CE-B8E5-335610462F58}.Debug|x86.ActiveCfg = Debug|Win32
{8D2B73FB-EECD-45CE-B8E5-335610462F58}.Debug|x86.Build.0 = Debug|Win32
{8D2B73FB-EECD-45CE-B8E5-335610462F58}.MinSizeRel|x64.ActiveCfg = Release|x64
{8D2B73FB-EECD-45CE-B8E5-335610462F58}.MinSizeRel|x64.Build.0 = Release|x64
{8D2B73FB-EECD-45CE-B8E5-335610462F58}.MinSizeRel|x86.ActiveCfg = Release|Win32
{8D2B73FB-EECD-45CE-B8E5-335610462F58}.MinSizeRel|x86.Build.0 = Release|Win32
{8D2B73FB-EECD-45CE-B8E5-335610462F58}.Release|x64.ActiveCfg = Release|x64
{8D2B73FB-EECD-45CE-B8E5-335610462F58}.Release|x64.Build.0 = Release|x64
{8D2B73FB-EECD-45CE-B8E5-335610462F58}.Release|x86.ActiveCfg = Release|Win32
{8D2B73FB-EECD-45CE-B8E5-335610462F58}.Release|x86.Build.0 = Release|Win32
{8D2B73FB-EECD-45CE-B8E5-335610462F58}.RelWithDebInfo|x64.ActiveCfg = Release|x64
{8D2B73FB-EECD-45CE-B8E5-335610462F58}.RelWithDebInfo|x64.Build.0 = Release|x64
{8D2B73FB-EECD-45CE-B8E5-335610462F58}.RelWithDebInfo|x86.ActiveCfg = Release|Win32
{8D2B73FB-EECD-45CE-B8E5-335610462F58}.RelWithDebInfo|x86.Build.0 = Release|Win32
{E61BCFC0-BC33-46D1-A144-9021FEF7F6BC}.Debug|x64.ActiveCfg = Debug|x64
{E61BCFC0-BC33-46D1-A144-9021FEF7F6BC}.Debug|x64.Build.0 = Debug|x64
{E61BCFC0-BC33-46D1-A144-9021FEF7F6BC}.Debug|x86.ActiveCfg = Debug|Win32
{E61BCFC0-BC33-46D1-A144-9021FEF7F6BC}.Debug|x86.Build.0 = Debug|Win32
{E61BCFC0-BC33-46D1-A144-9021FEF7F6BC}.MinSizeRel|x64.ActiveCfg = Debug|x64
{E61BCFC0-BC33-46D1-A144-9021FEF7F6BC}.MinSizeRel|x64.Build.0 = Debug|x64
{E61BCFC0-BC33-46D1-A144-9021FEF7F6BC}.MinSizeRel|x86.ActiveCfg = Debug|Win32
{E61BCFC0-BC33-46D1-A144-9021FEF7F6BC}.MinSizeRel|x86.Build.0 = Debug|Win32
{E61BCFC0-BC33-46D1-A144-9021FEF7F6BC}.Release|x64.ActiveCfg = Release|x64
{E61BCFC0-BC33-46D1-A144-9021FEF7F6BC}.Release|x64.Build.0 = Release|x64
{E61BCFC0-BC33-46D1-A144-9021FEF7F6BC}.Release|x86.ActiveCfg = Release|Win32
{E61BCFC0-BC33-46D1-A144-9021FEF7F6BC}.Release|x86.Build.0 = Release|Win32
{E61BCFC0-BC33-46D1-A144-9021FEF7F6BC}.RelWithDebInfo|x64.ActiveCfg = Release|x64
{E61BCFC0-BC33-46D1-A144-9021FEF7F6BC}.RelWithDebInfo|x64.Build.0 = Release|x64
{E61BCFC0-BC33-46D1-A144-9021FEF7F6BC}.RelWithDebInfo|x86.ActiveCfg = Release|Win32
{E61BCFC0-BC33-46D1-A144-9021FEF7F6BC}.RelWithDebInfo|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
6 changes: 6 additions & 0 deletions CyberFSR/CyberFSR.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@
<AdditionalDependencies>vulkan-1.lib;ffx_fsr2_api_x64.lib;ffx_fsr2_api_dx12_x64.lib;ffx_fsr2_api_vk_x64.lib;%(AdditionalDependencies)</AdditionalDependencies>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
</Link>
<PreBuildEvent>
<Command>call "..\BuildFSR2.bat"</Command>
</PreBuildEvent>
<PreBuildEvent>
<Message>Clear and rebuildall FSR2 artifacts</Message>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="Config.h" />
Expand Down

0 comments on commit 12fa404

Please sign in to comment.