Skip to content

Commit 2e8026f

Browse files
committed
Update nuget
1 parent 6f13a91 commit 2e8026f

3 files changed

Lines changed: 17 additions & 24 deletions

File tree

Samples/Desktop/D3D12HelloWorld/src/HelloPartialGraphicsPrograms/D3D12HelloPartialGraphicsPrograms.cpp

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,17 @@ void D3D12HelloPartialGraphicsPrograms::LoadPipeline()
210210
ThrowIfFailed(E_FAIL);
211211
}
212212

213+
214+
// Check partial graphics program support.
215+
D3D12_FEATURE_DATA_PARTIAL_GRAPHICS_PROGRAMS partialGraphicsProgramTier = {};
216+
ThrowIfFailed(m_device->CheckFeatureSupport(
217+
D3D12_FEATURE_PARTIAL_GRAPHICS_PROGRAMS, &partialGraphicsProgramTier, sizeof(partialGraphicsProgramTier)));
218+
if (partialGraphicsProgramTier.PartialGraphicsProgramsTier < D3D12_PARTIAL_GRAPHICS_PROGRAMS_TIER_1_0)
219+
{
220+
OutputDebugStringA("Partial Graphics Programs Tier 1.0 is required.");
221+
ThrowIfFailed(E_FAIL);
222+
}
223+
213224
// Describe and create the command queue.
214225
D3D12_COMMAND_QUEUE_DESC queueDesc = {};
215226
queueDesc.Flags = D3D12_COMMAND_QUEUE_FLAG_NONE;
@@ -300,16 +311,6 @@ void D3D12HelloPartialGraphicsPrograms::LoadAssets()
300311
// https://github.com/microsoft/DirectX-Specs/blob/master/d3d/PartialGraphicsPrograms.md
301312
// -------------------------------------------------------------------------
302313
{
303-
// First check device support.
304-
D3D12_FEATURE_DATA_PARTIAL_GRAPHICS_PROGRAMS pgp = {};
305-
ThrowIfFailed(m_device->CheckFeatureSupport(
306-
D3D12_FEATURE_PARTIAL_GRAPHICS_PROGRAMS, &pgp, sizeof(pgp)));
307-
if (pgp.PartialGraphicsProgramsTier < D3D12_PARTIAL_GRAPHICS_PROGRAMS_TIER_1_0)
308-
{
309-
OutputDebugStringA("Partial Graphics Programs Tier 1.0 is required.");
310-
ThrowIfFailed(E_FAIL);
311-
}
312-
313314
// Compile VS + PS once.
314315
ComPtr<ID3DBlob> vertexShader;
315316
ComPtr<ID3DBlob> pixelShader;
@@ -356,7 +357,7 @@ void D3D12HelloPartialGraphicsPrograms::LoadAssets()
356357

357358
// ---------------------------------------------------------------------
358359
// 1. Collection state object: shaders + VSPartial + PSPartial.
359-
// Per the spec, partial programs in a collection are compiled when
360+
// Partial graphics programs in a collection are compiled when
360361
// the collection is created, so the executable state object that
361362
// references it only has to perform a cheap link step.
362363
// ---------------------------------------------------------------------
@@ -391,12 +392,6 @@ void D3D12HelloPartialGraphicsPrograms::LoadAssets()
391392
pRTFormats->SetNumRenderTargets(1);
392393
pRTFormats->SetRenderTargetFormat(0, DXGI_FORMAT_R8G8B8A8_UNORM);
393394

394-
// Pre-rasterization partial program fields: input layout is baked
395-
// in (not late-linked) since it doesn't vary across permutations.
396-
auto pPreRastFields = collectionDesc.CreateSubobject<CD3DX12_PRERASTERIZATION_SHADERS_PARTIAL_PROGRAM_FIELDS_SUBOBJECT>();
397-
pPreRastFields->SetExcludePS(FALSE);
398-
pPreRastFields->SetLateLinkInputLayoutSubobject(FALSE);
399-
400395
// Pixel shader partial program fields: blend will be late linked.
401396
// AlphaToCoverageEnable and DualSourceBlendEnable affect PS
402397
// compilation, so they must be specified here (the late-linked
@@ -412,13 +407,11 @@ void D3D12HelloPartialGraphicsPrograms::LoadAssets()
412407
pPreRastProgram->AddExport(L"VSMain");
413408
pPreRastProgram->AddSubobject(*pIL);
414409
pPreRastProgram->AddSubobject(*pTopology);
415-
pPreRastProgram->AddSubobject(*pPreRastFields);
416410

417411
auto pPSProgram = collectionDesc.CreateSubobject<CD3DX12_PARTIAL_GRAPHICS_PROGRAM_SUBOBJECT>();
418412
pPSProgram->SetProgramName(L"PSPartial");
419413
pPSProgram->SetPartialGraphicsProgramType(D3D12_PARTIAL_GRAPHICS_PROGRAM_TYPE_PIXEL_SHADER);
420414
pPSProgram->AddExport(L"PSMain");
421-
pPSProgram->AddSubobject(*pTopology);
422415
pPSProgram->AddSubobject(*pRTFormats);
423416
pPSProgram->AddSubobject(*pPSFields);
424417

Samples/Desktop/D3D12HelloWorld/src/HelloPartialGraphicsPrograms/D3D12HelloPartialGraphicsPrograms.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" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="..\packages\Microsoft.Direct3D.D3D12.1.721.0-146172275-preview\build\native\Microsoft.Direct3D.D3D12.props" Condition="Exists('..\packages\Microsoft.Direct3D.D3D12.1.721.0-146172275-preview\build\native\Microsoft.Direct3D.D3D12.props')" />
3+
<Import Project="..\packages\Microsoft.Direct3D.D3D12.1.721.0-preview\build\native\Microsoft.Direct3D.D3D12.props" Condition="Exists('..\packages\Microsoft.Direct3D.D3D12.1.721.0-preview\build\native\Microsoft.Direct3D.D3D12.props')" />
44
<Import Project="..\packages\Microsoft.Direct3D.DXC.1.8.2505.32\build\native\Microsoft.Direct3D.DXC.props" Condition="Exists('..\packages\Microsoft.Direct3D.DXC.1.8.2505.32\build\native\Microsoft.Direct3D.DXC.props')" />
55
<ItemGroup Label="ProjectConfigurations">
66
<ProjectConfiguration Include="Debug|x64">
@@ -143,15 +143,15 @@
143143
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
144144
<ImportGroup Label="ExtensionTargets">
145145
<Import Project="..\packages\Microsoft.Direct3D.DXC.1.8.2505.32\build\native\Microsoft.Direct3D.DXC.targets" Condition="Exists('..\packages\Microsoft.Direct3D.DXC.1.8.2505.32\build\native\Microsoft.Direct3D.DXC.targets')" />
146-
<Import Project="..\packages\Microsoft.Direct3D.D3D12.1.721.0-146172275-preview\build\native\Microsoft.Direct3D.D3D12.targets" Condition="Exists('..\packages\Microsoft.Direct3D.D3D12.1.721.0-146172275-preview\build\native\Microsoft.Direct3D.D3D12.targets')" />
146+
<Import Project="..\packages\Microsoft.Direct3D.D3D12.1.721.0-preview\build\native\Microsoft.Direct3D.D3D12.targets" Condition="Exists('..\packages\Microsoft.Direct3D.D3D12.1.721.0-preview\build\native\Microsoft.Direct3D.D3D12.targets')" />
147147
</ImportGroup>
148148
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
149149
<PropertyGroup>
150150
<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>
151151
</PropertyGroup>
152152
<Error Condition="!Exists('..\packages\Microsoft.Direct3D.DXC.1.8.2505.32\build\native\Microsoft.Direct3D.DXC.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Direct3D.DXC.1.8.2505.32\build\native\Microsoft.Direct3D.DXC.props'))" />
153153
<Error Condition="!Exists('..\packages\Microsoft.Direct3D.DXC.1.8.2505.32\build\native\Microsoft.Direct3D.DXC.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Direct3D.DXC.1.8.2505.32\build\native\Microsoft.Direct3D.DXC.targets'))" />
154-
<Error Condition="!Exists('..\packages\Microsoft.Direct3D.D3D12.1.721.0-146172275-preview\build\native\Microsoft.Direct3D.D3D12.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Direct3D.D3D12.1.721.0-146172275-preview\build\native\Microsoft.Direct3D.D3D12.props'))" />
155-
<Error Condition="!Exists('..\packages\Microsoft.Direct3D.D3D12.1.721.0-146172275-preview\build\native\Microsoft.Direct3D.D3D12.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Direct3D.D3D12.1.721.0-146172275-preview\build\native\Microsoft.Direct3D.D3D12.targets'))" />
154+
<Error Condition="!Exists('..\packages\Microsoft.Direct3D.D3D12.1.721.0-preview\build\native\Microsoft.Direct3D.D3D12.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Direct3D.D3D12.1.721.0-preview\build\native\Microsoft.Direct3D.D3D12.props'))" />
155+
<Error Condition="!Exists('..\packages\Microsoft.Direct3D.D3D12.1.721.0-preview\build\native\Microsoft.Direct3D.D3D12.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Direct3D.D3D12.1.721.0-preview\build\native\Microsoft.Direct3D.D3D12.targets'))" />
156156
</Target>
157157
</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.721.0-146172275-preview" targetFramework="native" />
3+
<package id="Microsoft.Direct3D.D3D12" version="1.721.0-preview" targetFramework="native" />
44
<package id="Microsoft.Direct3D.DXC" version="1.8.2505.32" targetFramework="native" />
55
</packages>

0 commit comments

Comments
 (0)