Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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.

Assessment

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

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.

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

Dominant language
C++
Stars
6.8k
Forks
2.2k
Avg merge
3d 3h
Merged PRs (30d)
3

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from microsoft/DirectX-Graphics-Samples

All issues in microsoft/DirectX-Graphics-Samples

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.