microsoft / microsoft/DirectX-Graphics-Samples

Use D3D12_SDK_VERSION macro consistently across samples, instead of explicitly setting the version in source files.

Open
#953 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
6.8k
Forks
2.2k
PR merge metrics
No merged PRs in 30d

Description

Many samples explicitly reference the d3d12 sdk version

extern "C" { __declspec(dllexport) extern const UINT D3D12SDKVersion = 618; }

Whenever the SDK version is updated, the source files must also be updated, which is a tedius and annoying process. If, instead, the version is set to D3D12_SDK_VERSION then samples will automatically use the correct version.

extern "C" { __declspec(dllexport) extern const UINT D3D12SDKVersion = D3D12_SDK_VERSION; }

Example locations of this: (But there are many many more!)

https://github.com/microsoft/DirectX-Graphics-Samples/blob/b550a78e815bbc8b7a0fd948efab11c01d9a1ed2/Samples/Desktop/D3D12Raytracing/src/D3D12RaytracingHelloWorld/D3D12RaytracingHelloWorld.cpp#L20

https://github.com/microsoft/DirectX-Graphics-Samples/blob/b550a78e815bbc8b7a0fd948efab11c01d9a1ed2/Samples/Desktop/D3D12On7/src/D3D12On7.cpp#L17

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the D3D12RaytracingHelloWorld.cpp and D3D12On7.cpp locations, then search the samples for explicit D3D12SDKVersion definitions using the numeric SDK version. Update the identified definitions to use D3D12_SDK_VERSION and verify that no samples still hard-code the version.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.