Skip to main content
8 votes

What does each byte in DXGI_FORMAT_R8G8B8A8_UNORM store?

The format modifiers like _UNORM / _SNORM / _FLOAT, etc... are documented on the DXGI_FORMAT ...
Turtlefight's user avatar
5 votes
Accepted

Why are committed resources better than placed resources?

You will get contradicting suggestions from their own: http://developer2.download.nvidia.com/assets/gameworks/downloads/regular/GDC17/DX12CaseStudies_GDC2017_FINAL.pdf Page 14: "Sub-allocation ...
macrod's user avatar
  • 66
5 votes
Accepted

DirectX 12 using Visual studio 2015 on Windows 7 SP1

According to Microsoft itself the latest DirectX version supported on Windows 7 SP1 is "DX11.1". Even on Windows 8 you don't have access to DX12. I guess that's what causing the problem. No matter ...
Ali1S232's user avatar
  • 8,677
4 votes
Accepted

How to update vertex buffer in DirectX 12

This is an old question, so I'm not sure how relevant this answer will be now, but... In DirectX 11 there are "4 kinds" of resources indicated by their ...
Chuck Walbourn's user avatar
3 votes
Accepted

error X4016: SV_InstanceID semantic cannot be used with 10Level9 targets

TL;DR: Edit your shader compilation to use Shader Model 5.1 or later. With the DirectX 12 API, there is no supported device to date that supports anything less than Direct3D Feature Level 11.0. ...
Chuck Walbourn's user avatar
3 votes
Accepted

D3D12: how to enable perspective correction when interpolating UV coordinates?

You've lost perspective correctness due to the way you've written your vertex shader. Ordinarily, we'll transform our vertex from view space to clip space by multiplying it by a projection matrix that ...
DMGregory's user avatar
  • 135k
3 votes
Accepted

How to read pixel data from a ID3D12Resource?

The steps you want are roughly: Create a D3D12_RESOURCE_STATE_COPY_DEST resource on a D3D12_HEAP_TYPE_READBACK heap. Transition ...
Adam's user avatar
  • 7,384
2 votes
Accepted

DirectX 12 and Feature levels

You are confusing the "Runtime version" with the Direct3D Hardware Feature level. They are not the same thing. The DirectX 12 API is only supported by the Windows 10 operating system. There is no ...
Chuck Walbourn's user avatar
2 votes

Dynamic Shader Linkage in DirectX12?

Yes. They are provided in the D3DCompile library: https://msdn.microsoft.com/en-us/library/windows/desktop/dd607342(v=vs.85).aspx
CobaltHex's user avatar
  • 2,248
2 votes

Direct3D 12 can't create a swap chain

You haven't listed what type the mFactory variable is, but based on the fact that you are calling CreateSwapChain I'm assuming ...
Chuck Walbourn's user avatar
2 votes
Accepted

Resize window in D3D12

I have to wait for my GPU to idle before I can resize. This code make wait GPU: ...
Range's user avatar
  • 159
2 votes
Accepted

What is the difference between D3D12 structures/functions with terminal 1 in the name and without?

Looking at the documentation the D3D12_DESCRIPTOR_RANGE1 structure has one extra member D3D12_DESCRIPTOR_RANGE_FLAGS Flags; to ...
Stephane Hockenhull's user avatar
2 votes

DirectX12 root signature error while using compute shader with ConsumeStructuredBuffer

In the computer shader code, I had to declare the type as "static const", otherwise this would override it from the app via constant buffer. static const float TimeStep = 1.0f / 60.0f;
Hooman's user avatar
  • 121
2 votes
Accepted

How can I write a D3D12 texture in cuda?

When creating the resources, one can export and map the texture resource to a cuda surface, subsequently available for direct read and write. The export and map needs only to happen once. The key ...
Soleil's user avatar
  • 180
2 votes
Accepted

Howto use the depth buffer in DirectX 12

You should check that matrix. The DirectXMath function XMMatrixPerspectiveFovLH returns 'row-major' memory order, but HLSL defaults to 'column-major' unless you ...
Chuck Walbourn's user avatar
2 votes
Accepted

Specifying a root signature in the HLSL code of a DXR shader

The solution here is to build an explicit root signature binary and then use that one. The DXIL Library itself doesn't contain the signature, only references to it. The actual command-line is a bit ...
Chuck Walbourn's user avatar
2 votes

How many command lists should there be in DirectX 12?

As with all optimization advice: It depends. The basic render loop is one D3D12_COMMAND_LIST_TYPE_DIRECT Command Queue, one Command Allocator per backbuffer swap ...
Chuck Walbourn's user avatar
2 votes

What does VSync mean on a variable refresh rate monitor?

With regards to the DX API, your intuition is correct. Variable refresh rate (vrr) displays require tearing to be enabled, meaning Vsync is off. Conversely if Vsync is on, you no longer have a ...
Pikalek's user avatar
  • 12.4k
2 votes
Accepted

Is DirectX 12 or lower just an API?

Shall it support all GPUs? Or just newer GPUs? What about the version of the Windows OS supported? From Nvidia, DirectX12 supports all GPUs using the Ampere (RTX 3000 Series), Turing (RTX 2000 Series)...
Pow's user avatar
  • 404
2 votes

Set Textures DX12

...
black4's user avatar
  • 205
1 vote

How do I corretly use a Direct X 12 Root Signature?

There are two ways to define root signatures. You can create the root signature C++ code, and then when you load the shader with the root signature it will 'rebuild' it to bind to that particular ...
Chuck Walbourn's user avatar
1 vote

What's the relationship between the actor's pose and shape's pose in PhysX?

As DMGregory mentioned An actor can have many shapes(parts), all together ensembles the overall actor's behaviour, thus each shape can have it's own position(in local space) relative to the actor's ...
ma1169's user avatar
  • 143
1 vote
Accepted

Compile shader and root signature of a ray tracing shader into a single binary using DXC

ID3D12Device::CreateRootSignature expects a pointer to the data, as well as the data length. You could combine your shader and root signature into one blob, but you'...
Mark Ingram's user avatar
1 vote

Building a unified interface for a swap chain in both DirectX 12 and Vulkan

The whole point of APIs like DirectX 12 and Vulkan is to minimize CPU overhead, and therefore they have extremely thin API abstractions. As such, wrapping them in a low-level API basically defeats ...
Chuck Walbourn's user avatar
1 vote
Accepted

How to set root signatures specified in HLSL in my command list?

You can provide any compiled shader blob that contains the desired root signature defined in HLSL when creating the root signature object: ...
Chuck Walbourn's user avatar
1 vote
Accepted

Directx 12 Root signature compatibility with pso

If you use a different root signature than the PSO was created with you get (with the Debug device enabled): ...
Chuck Walbourn's user avatar
1 vote
Accepted

DX12 Passing an Instance Buffer

I eventually got this working. As I said, my biggest mistake was apparently the fact that I wasn't handling the m_vertexBufferView properly per Tubby94's Reddit post that I mentioned in the comments. ...
Shawn Eary's user avatar
1 vote
Accepted

How do I draw text using DirectX 12?

How did you draw your text with DirectX 11? D3DX9, D3DX10, D3DX11 and in fact the entire ...
Chuck Walbourn's user avatar
1 vote
Accepted

CreateGraphicsPipelineState

In DX12, you will be creating one input layout per pipeline state. This is preferable, because the driver will have all the knowledge of the shaders and input layout and it can do several ...
János Turánszki's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible