Questions tagged [direct3d12]

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.

79 questions
3
votes
1 answer

What is the D3D12 equivalent of D3D11 CreateTexture2D?

I'm new to direct3d programming and I have been building a simple windows application to display 4 images one after other with d3d12. I know a basic understanding of the D3D12 architecture and so far I've created four command allocator (backb…
ngub05
  • 566
  • 1
  • 8
  • 15
3
votes
1 answer

Initializing D3D12 debug interfaces failing on laptop with GeForce 960M

When I try to call D3D12GetDebugInterface or CreateDXGIFactory2 with the flag DXGI_CREATE_FACTORY_DEBUG, the calls are failing on my laptop, but not on my desktop. Other calls work fine on the laptop and I can render stuff -- I just can't initialize…
Joe
  • 2,008
  • 1
  • 17
  • 25
2
votes
0 answers

Are HLSL loops broken?

I've been messing around with HLSL and Direct3D12 and encountered something strange. Here's a minimal reproducible example: float4 main() : SV_TARGET { uint indices[3]; indices[0] = 0; uint l = 0; [loop] while (true) { if…
BubLblckZ
  • 434
  • 4
  • 14
2
votes
1 answer

What's the benefit of unmapping a resource in DirectX12

In a past question DirectX12 Upload Synchronization D3D12_HEAP_TYPE_UPLOAD, I got into trouble unmaping an upload resource, using it in a command list and executing, then mapping again and overwritting before the gpu had used the previous data I…
Tom Huntington
  • 2,260
  • 10
  • 20
2
votes
1 answer

Fullscreen mode not working in D3D12 raytracing samples

Presently I'm learning the basics of real-time raytracing with the DXR API in DirectX 12 Ultimate. I'm studying the D3D12 raytracing samples on the official GitHub and am using an i9/Intel Iris Xe/RTX3070 laptop and building the programs in…
2
votes
1 answer

Why are the D3D12 samples using WM_PAINT?

If you're trying to program a game, you really shouldn't wait around for WM_PAINT signals from the O/S to draw. You should repeatedly draw as quickly as possible. Why then in the D3D sample code is rendering happening in WM_PAINT? How can I rework…
bobobobo
  • 64,917
  • 62
  • 258
  • 363
2
votes
1 answer

D3D12 Tiled Resources Tier 4

On https://learn.microsoft.com/en-us/windows/win32/api/d3d12/ne-d3d12-d3d12_tiled_resources_tier are four possible tiers for Tiled Resources. But the fourth tier is undocumented in contrast to the others, so I can't figure out what this tier is for.…
L1-Cache
  • 91
  • 6
2
votes
1 answer

Setting multiple descriptors in a descriptor range in Direct3D 12

First of all, my understanding of a descriptor range is that I can specify multiple buffers (constant buffers in my case) that a shader may use, is that correct? If not, then this is where my misunderstanding is, and the rest of the question will…
user9670587
2
votes
1 answer

Is there something like vkCmdBlitImage for D3D12?

I'd like to create a mipmap chain for a 2D texture by blitting the base image into mip levels. In Vulkan, vkCmdBlitImage can be used to do this while linearly filtering the image (see another question). How can I achieve the same in D3D12?
SurvivalMachine
  • 7,946
  • 15
  • 57
  • 87
2
votes
1 answer

Extra swap chain buffer reference in ID3D11On12Device::AcquireWrappedResources()

I'm interested in using the "Direct 3D 11 on 12" library, but am running into trouble when resizing the window. In particular, I'm modifying the Visual Studio "DirectX 12 App" sample. I'm creating the ID3D11On12Device just after the sample creates…
Litherum
  • 22,564
  • 3
  • 23
  • 27
1
vote
1 answer

IDXGISwapChain::GetCurrentBackBufferIndex returns wrong index

I am getting the error D3D12 ERROR: ID3D12CommandQueue::ExecuteCommandLists: A command list, which writes to a swapchain back buffer, may only be executed when that back buffer is the back buffer that will be presented during the next call to…
Tom Huntington
  • 2,260
  • 10
  • 20
1
vote
1 answer

Question about D3D12 vertex drawing order

I want to draw a rectangle using D3D12, but why do I need to set the 'N' shaped vertex order to draw it correctly? I am not quite familiar with this aspect. struct GRS_VERTEX { XMFLOAT4 Position; XMFLOAT4 Color; }; GRS_VERTEX…
DGAF
  • 71
  • 7
1
vote
1 answer

Using the same buffer as input and output for a compute shader

Hopefully a very simple question! I have a particle system that I'm updating with a compute shader (just updating a buffer with position data). Right now I'm reading from an input buffer and writing to a different output buffer (that will be the…
Varrak
  • 708
  • 3
  • 13
1
vote
1 answer

DRED GetAutoBreadcrumbsOutput() gives hresult DXGI_ERROR_UNSUPPORTED

Naively copy pasting from https://devblogs.microsoft.com/directx/dred/ winrt::com_ptr
Tom Huntington
  • 2,260
  • 10
  • 20
1
vote
0 answers

How to manage D3D12 transition resource barrier safely?

How to manage D3D12 transition resource barrier (ex. Render Target <-> Present) safely? If each commandlist of multiple commandlists records transition barrier from Present to Render Target in the beginning of recording, and records transition…
YoonSeok OH
  • 647
  • 2
  • 7
  • 15