Skip to content

Commit e4d1dd7

Browse files
authored
Merge pull request #927 from microsoft/user/tvandewalle/tightAlignment_1.618
Update Tight Alignment sample to use AgilitySDK 1.618.1
2 parents 3f3903f + cbc41a8 commit e4d1dd7

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

Samples/Desktop/D3D12HelloWorld/src/HelloTightAlignment/D3D12HelloTightAlignment.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include "d3dx12.h"
1212
#include <dxgi1_6.h>
1313

14-
extern "C" { __declspec(dllexport) extern const UINT D3D12SDKVersion = 716; }
14+
extern "C" { __declspec(dllexport) extern const UINT D3D12SDKVersion = 618; }
1515
extern "C" { __declspec(dllexport) extern const char* D3D12SDKPath = u8".\\D3D12\\"; }
1616
extern "C" { __declspec(dllexport) extern const char* WarpPath = u8".\\WARP\\"; }
1717

@@ -221,12 +221,14 @@ int main()
221221
VERIFY_SUCCEEDED(D3D.spDevice->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS, &options, sizeof(options)));
222222
D3D.bIsHeapTier1 = options.ResourceHeapTier == D3D12_RESOURCE_HEAP_TIER_1;
223223

224+
// Depending on the vendor, you may actually see benefits for placed resources even with only 1 resource in the heap (smaller heap allocation).
224225
ComparePlacedBufferMemoryFootprint<1>(D3D); // No benefit due to the heap allocations being made in 64KiB chuncks
225226
ComparePlacedBufferMemoryFootprint<8>(D3D); // Can already see some benefit being realized
226227
ComparePlacedBufferMemoryFootprint<4096>(D3D); // drastic savings in most cases
227228

228229
PRINT("\n========================================\n========================================\n");
229230

231+
// Depending on the vendor, there may be no difference here since they now receive a hint that the heap is being implicitly created for a single resource.
230232
CompareCommittedBufferMemoryFootprint<1>(D3D);
231233
CompareCommittedBufferMemoryFootprint<8>(D3D);
232234
CompareCommittedBufferMemoryFootprint<4096>(D3D);

Samples/Desktop/D3D12HelloWorld/src/HelloTightAlignment/D3D12HelloTightAlignment.vcxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="..\packages\Microsoft.Direct3D.D3D12.1.716.0-preview\build\native\Microsoft.Direct3D.D3D12.props" Condition="Exists('..\packages\Microsoft.Direct3D.D3D12.1.716.0-preview\build\native\Microsoft.Direct3D.D3D12.props')" />
3+
<Import Project="..\packages\Microsoft.Direct3D.D3D12.1.618.1\build\native\Microsoft.Direct3D.D3D12.props" Condition="Exists('..\packages\Microsoft.Direct3D.D3D12.1.618.1\build\native\Microsoft.Direct3D.D3D12.props')" />
44
<ItemGroup Label="ProjectConfigurations">
55
<ProjectConfiguration Include="Debug|Win32">
66
<Configuration>Debug</Configuration>
@@ -58,7 +58,7 @@
5858
</ImportGroup>
5959
<ImportGroup Label="Shared">
6060
<Import Project="..\packages\Microsoft.Direct3D.WARP.1.0.14-preview\build\native\Microsoft.Direct3D.WARP.targets" Condition="Exists('..\packages\Microsoft.Direct3D.WARP.1.0.14-preview\build\native\Microsoft.Direct3D.WARP.targets')" />
61-
<Import Project="..\packages\Microsoft.Direct3D.D3D12.1.716.0-preview\build\native\Microsoft.Direct3D.D3D12.targets" Condition="Exists('..\packages\Microsoft.Direct3D.D3D12.1.716.0-preview\build\native\Microsoft.Direct3D.D3D12.targets')" />
61+
<Import Project="..\packages\Microsoft.Direct3D.D3D12.1.618.1\build\native\Microsoft.Direct3D.D3D12.targets" Condition="Exists('..\packages\Microsoft.Direct3D.D3D12.1.618.1\build\native\Microsoft.Direct3D.D3D12.targets')" />
6262
</ImportGroup>
6363
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
6464
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
@@ -143,7 +143,7 @@
143143
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
144144
</PropertyGroup>
145145
<Error Condition="!Exists('..\packages\Microsoft.Direct3D.WARP.1.0.14-preview\build\native\Microsoft.Direct3D.WARP.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Direct3D.WARP.1.0.14-preview\build\native\Microsoft.Direct3D.WARP.targets'))" />
146-
<Error Condition="!Exists('..\packages\Microsoft.Direct3D.D3D12.1.716.0-preview\build\native\Microsoft.Direct3D.D3D12.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Direct3D.D3D12.1.716.0-preview\build\native\Microsoft.Direct3D.D3D12.props'))" />
147-
<Error Condition="!Exists('..\packages\Microsoft.Direct3D.D3D12.1.716.0-preview\build\native\Microsoft.Direct3D.D3D12.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Direct3D.D3D12.1.716.0-preview\build\native\Microsoft.Direct3D.D3D12.targets'))" />
146+
<Error Condition="!Exists('..\packages\Microsoft.Direct3D.D3D12.1.618.1\build\native\Microsoft.Direct3D.D3D12.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Direct3D.D3D12.1.618.1\build\native\Microsoft.Direct3D.D3D12.props'))" />
147+
<Error Condition="!Exists('..\packages\Microsoft.Direct3D.D3D12.1.618.1\build\native\Microsoft.Direct3D.D3D12.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Direct3D.D3D12.1.618.1\build\native\Microsoft.Direct3D.D3D12.targets'))" />
148148
</Target>
149149
</Project>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Microsoft.Direct3D.D3D12" version="1.716.0-preview" targetFramework="native" />
3+
<package id="Microsoft.Direct3D.D3D12" version="1.618.1" targetFramework="native" />
44
<package id="Microsoft.Direct3D.WARP" version="1.0.14-preview" targetFramework="native" />
55
</packages>

0 commit comments

Comments
 (0)