Skip to content

Commit b06a9ad

Browse files
committed
Added checked build configuration.
1 parent 6d230d3 commit b06a9ad

File tree

4 files changed

+46
-2
lines changed

4 files changed

+46
-2
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,15 @@ Various debug visualizations, settings, and tools can be accessed using the UI.
3434

3535
Building should be as simple as opening `ThreeL.sln` in Visual Studio 2022 and pressing F5.
3636

37-
The debug configuration is instrumented with [WinPixEventRuntime](https://devblogs.microsoft.com/pix/winpixeventruntime/) if you want to inspect the structure of the frame using [PIX](https://devblogs.microsoft.com/pix/download/) or [RenderDoc](https://renderdoc.org/).
37+
 
38+
39+
ThreeL has three build configrations:
40+
41+
* Debug - Code optimizations disabled (including shaders) with debug layer & asserts – slowest
42+
* Checked - Optimizations enabled with asserts only – faster
43+
* Release - Optimizations enabled without asserts – fastest
44+
45+
The debug and checked configurations are instrumented with [WinPixEventRuntime](https://devblogs.microsoft.com/pix/winpixeventruntime/) if you're wanting to inspect the structure of the frame using [PIX](https://devblogs.microsoft.com/pix/download/) or [RenderDoc](https://renderdoc.org/).
3846

3947
## License
4048

ThreeL.sln

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ThreeL", "ThreeL\ThreeL.vcx
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Checked|x64 = Checked|x64
1011
Debug|x64 = Debug|x64
1112
Release|x64 = Release|x64
1213
EndGlobalSection
1314
GlobalSection(ProjectConfigurationPlatforms) = postSolution
15+
{2F056100-79B3-4AA6-A078-98BD6D5F6325}.Checked|x64.ActiveCfg = Checked|x64
16+
{2F056100-79B3-4AA6-A078-98BD6D5F6325}.Checked|x64.Build.0 = Checked|x64
1417
{2F056100-79B3-4AA6-A078-98BD6D5F6325}.Debug|x64.ActiveCfg = Debug|x64
1518
{2F056100-79B3-4AA6-A078-98BD6D5F6325}.Debug|x64.Build.0 = Debug|x64
1619
{2F056100-79B3-4AA6-A078-98BD6D5F6325}.Release|x64.ActiveCfg = Release|x64

ThreeL/DebugLayer.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,9 @@ namespace DebugLayer
201201
{
202202
std::wstring title = L"";
203203

204-
#ifndef NDEBUG
204+
#if defined(DEBUG)
205+
title += L"Debug";
206+
#elif !defined(NDEBUG)
205207
title += L"Checked";
206208
#endif
207209

ThreeL/ThreeL.vcxproj

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
<Import Project="..\packages\Microsoft.Direct3D.D3D12.1.610.4\build\native\Microsoft.Direct3D.D3D12.props" Condition="Exists('..\packages\Microsoft.Direct3D.D3D12.1.610.4\build\native\Microsoft.Direct3D.D3D12.props')" />
44
<Import Project="..\packages\Microsoft.Direct3D.DXC.1.7.2212.36\build\native\Microsoft.Direct3D.DXC.props" Condition="Exists('..\packages\Microsoft.Direct3D.DXC.1.7.2212.36\build\native\Microsoft.Direct3D.DXC.props')" />
55
<ItemGroup Label="ProjectConfigurations">
6+
<ProjectConfiguration Include="Checked|x64">
7+
<Configuration>Checked</Configuration>
8+
<Platform>x64</Platform>
9+
</ProjectConfiguration>
610
<ProjectConfiguration Include="Debug|x64">
711
<Configuration>Debug</Configuration>
812
<Platform>x64</Platform>
@@ -33,6 +37,13 @@
3337
<WholeProgramOptimization>true</WholeProgramOptimization>
3438
<CharacterSet>Unicode</CharacterSet>
3539
</PropertyGroup>
40+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Checked|x64'" Label="Configuration">
41+
<ConfigurationType>Application</ConfigurationType>
42+
<UseDebugLibraries>false</UseDebugLibraries>
43+
<PlatformToolset>v143</PlatformToolset>
44+
<WholeProgramOptimization>true</WholeProgramOptimization>
45+
<CharacterSet>Unicode</CharacterSet>
46+
</PropertyGroup>
3647
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
3748
<ImportGroup Label="ExtensionSettings">
3849
</ImportGroup>
@@ -46,6 +57,10 @@
4657
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
4758
<Import Project="ThreeL.props" />
4859
</ImportGroup>
60+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Checked|x64'" Label="PropertySheets">
61+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
62+
<Import Project="ThreeL.props" />
63+
</ImportGroup>
4964
<PropertyGroup Label="UserMacros" />
5065
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
5166
<ClCompile>
@@ -75,6 +90,22 @@
7590
<GenerateDebugInformation>true</GenerateDebugInformation>
7691
</Link>
7792
</ItemDefinitionGroup>
93+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Checked|x64'">
94+
<ClCompile>
95+
<WarningLevel>Level3</WarningLevel>
96+
<FunctionLevelLinking>true</FunctionLevelLinking>
97+
<IntrinsicFunctions>true</IntrinsicFunctions>
98+
<SDLCheck>true</SDLCheck>
99+
<PreprocessorDefinitions>USE_PIX;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
100+
<ConformanceMode>true</ConformanceMode>
101+
</ClCompile>
102+
<Link>
103+
<SubSystem>Console</SubSystem>
104+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
105+
<OptimizeReferences>true</OptimizeReferences>
106+
<GenerateDebugInformation>true</GenerateDebugInformation>
107+
</Link>
108+
</ItemDefinitionGroup>
78109
<ItemGroup>
79110
<ClCompile Include="..\external\DearImGui\imgui.cpp" />
80111
<ClCompile Include="..\external\DearImGui\imgui_demo.cpp" />

0 commit comments

Comments
 (0)