DirectX 12 introduces the next version of Direct3D, the 3D graphics API at the heart of DirectX. This version of Direct3D is faster and more efficient than any previous version. Direct3D 12 enables richer scenes, more objects, more complex effects, and full utilization of modern GPU hardware. It is supported on Windows 10 and Xbox One.
Questions tagged [directx-12]
347 questions
2
votes
1 answer
WM_PAINT and DX12
Hi!
Could someone anwser my question, please?
My program has one thread for the window's message loop and another for D3D12 rendering.
Everything is fine, but the question is what window proc. should do with WM_PAINT?
Currently the app has such…

Włodzimierz O. Kubera
- 149
- 2
- 11
2
votes
0 answers
RWStructuredBuffer counter not decrementing (DX12)
I am trying to implement Photon-Mapping in DXR using DX12. Details aside, I have a RWStructured buffer that I store Photons in. The buffer is written to from within a closest hit shader, and I synchronize writes to this buffer from multiple thread…

GaspardWinckler
- 21
- 3
2
votes
0 answers
Exceed end of the virtual address at CreateConstantBufferView
I'm following "Game Programming using DirectX12" ch.6 codes.
But in at ID3DDevice::CreateConstantBufferView, I found D3D12 Error.
D3D12 ERROR: ID3D12Device::CreateConstantBufferView: pDesc->BufferLocation + SizeInBytes - 1 (0x00000000087b00ff)…

RedChiken
- 21
- 2
2
votes
1 answer
DX12 Initialization Fail VS2019
I have done the init steps in DX10/11/12 many times before, all of a sudden in VS2019 DX12 will not create anything besides the following objects: ID3D12Debug, ID3D12InfoQueue, ID3D12Device2.
Even a straight creation of command queue fails:
bool…

Sixjac
- 339
- 4
- 16
2
votes
1 answer
Problems with the box example in Frank Luna's introduction to his book '3D game programming with DirectX12'
I am beginning to study Frank Luna's book '3D game programming with DirectX12'. To follow precisely his steps I have downloaded Visual Studio 2015 ( BUT I CAN INSTALL ANY VERSION YOU MAY SUGGEST ), even if now we are in 2020. When attempting to…

cppstudent
- 23
- 4
2
votes
1 answer
What exactly is Vulkan or metal or any of these graphics "APIs"?
I would like an explanation of what exactly the Vulkan API is. Is it essentially a service that runs on an operating system that talks to a graphics card? Or what exactly is it and how does it work? For example I don't understand why there are…

Rami
- 490
- 7
- 22
2
votes
3 answers
How to get adapter driver version in DirectX12?
In DirectX9 I can call IDirect3D9::GetAdapterIdentifier method to get D3DADAPTER_IDENTIFIER9 with adapter driver version DriverVersion.
Is there anything similar in DirectX12 for getting a driver version?

volodya7292
- 454
- 8
- 20
2
votes
2 answers
What is the difference between a "resource" and a "resource view"?
In Vulkan, a memory resource is accessed via "pointer-like" metadata contained in a "view", which describes how the memory resource should be interpreted. A descriptor is data which specifies to a shader "where" this memory will be located.
In…

bzm3r
- 3,113
- 6
- 34
- 67
2
votes
1 answer
Seemingly useless line in C++ Direct X 12 Samples code
In one of the files of the Direct X Samples "MiniEngine" ( https://github.com/Microsoft/DirectX-Graphics-Samples/tree/master/MiniEngine ) I found this line that confused me:
void CameraController::Update( float deltaTime )
{
(deltaTime); // <--…

AaronHolland
- 1,595
- 1
- 16
- 32
2
votes
1 answer
How to implement interoperation between XAML and a DirectX swap chain with C++/WinRT
Microsoft Documentation provides the code to implement interoperation between XAML and a DirectX swap chain with C++ [1]:
Microsoft::WRL::ComPtr m_swapChainNative;
// ...
IInspectable* panelInspectable = (IInspectable*)…

C. D'Alessandro
- 21
- 4
2
votes
1 answer
Premake5: How to build HLSL shaders?
I'm struggling to figure out how to set up my hlsl shaders to work with Premake5 and Visual Studio 2017.
I have no idea how to tell Premake5 to compile my hlsl shaders, as a pre-build step.
Here are my goals for this pre-build step:
Specify…
user11164186
2
votes
1 answer
Constant Buffer not binding although other buffers are binding? (DirectX12)
So I have the following function which renders animated entities
void DeferredRenderer::DrawAnimated(ID3D12GraphicsCommandList * clist, std::vector entities)
{
clist->SetPipelineState(sysRM->GetPSO(StringID("animDeferredPSO")));
…

Nitish Victor
- 183
- 12
2
votes
0 answers
"D3D12 ERROR: ID3D12Device::CreateComputePipelineState: Root Signature doesn't match Compute Shader..." where is the mistake in my code?
The full error in the debug output is:
"D3D12 ERROR: ID3D12Device::CreateComputePipelineState: Root Signature doesn't match Compute Shader: Shader SRV descriptor range (RegisterSpace=0, NumDescriptors=1, BaseShaderRegister=0) is not fully bound in…

MNagy
- 423
- 7
- 20
2
votes
1 answer
SetGraphicsRootDescriptorTable gives ambiguous error
One of my calls to SetGraphicsRootDescriptorTable returns the following error:
D3D12 ERROR: CGraphicsCommandList::SetGraphicsRootDescriptorTable: The descriptor heap (0x052184B0:'m_lightBufHeap') containing handle 0x0546DDE0 is different from…

jsg
- 23
- 3
2
votes
1 answer
D3D12 Use backbuffer surface as unordered access view (UAV)
Im making a simple raytracer for a schoolproject were a compute shader is supposed to be used to shade a triangle or some other primitive.
For this I'd like to write to a backbuffer-surface directly in the compute shader, to then present the…

GPUretarded
- 21
- 3