Skip to main content

Questions tagged [directx12]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
23 votes
3 answers
1k views

Why is thread safety such a huge deal for Graphics APIs?

Both Vulkan and DirectX12 are claimed to be usable in a thread-safe manner. People seem to be excited about that. Why is this considered such a huge feature? The "real" processing gets thrown over ...
ratchet freak's user avatar
14 votes
1 answer
4k views

How many Direct/Compute/Copy Queues are meaningful?

DirectX 12 exposes command queues for either graphics (called "Direct"), compute or copy tasks. In terms of provided functionality, each one is a super-set of the following one. The specification ...
Wumpf's user avatar
  • 853
9 votes
2 answers
4k views

What's the main difference of pipeline process between Vulkan and DX12?

DX12 introduces a new feature of pipeline named 'Bundle'. It seems that can optimize the command list, and send it to final pipeline. Vulkan invent some different pipeline: The graphic pipeline and ...
naive231's user avatar
  • 199
8 votes
1 answer
913 views

DirectX12 CbvHeap

With directX12 they introduced heap descriptors. A way for us to describe the table for resources we wanted to send to the shaders. I'm admittedly very new at computer graphics and only tinkered a bit ...
Andrew Wilson's user avatar
6 votes
1 answer
4k views

How does DirectX 12 SLI VRAM stacking work?

Mainly talking about dual-SLI here for consistency. With past DirectX (and OpenGL) APIs, VRAM was mirrored across graphics cards. With dual-SLI, this was possible by rendering one frame with one ...
aces's user avatar
  • 1,353
6 votes
0 answers
742 views

How to account for self intersection with large ray tracing scenes?

I'm working on a hybrid real time ray tracing project and trying to tackle the problem of self-intersection with larger scenes due to loss of float accuracy. The logic I'm trying to use is based on ...
Florian Schut's user avatar
5 votes
1 answer
1k views

Dx12 Vertex Buffer incorrect

I'm playing around with directX 12 and I'm having some problems loading geometry in. I have a std::vector vertices definition and I do exactly what the dx12 template does with it. ...
Andrew Wilson's user avatar
4 votes
1 answer
476 views

How much does driver quality affect Vulkan and DX12 compared to OpenGL and DX11?

Considering the fact that Vulkan and DX12 delegate most of the memory management / work scheduling tasks to the application itself, how much do drivers affect performance? To put my question into ...
mbl's user avatar
  • 301
4 votes
2 answers
3k views

How does ID3D12Resource::Map work?

How does Map() work? I would guess that it allocates memory to fit the resource size (or a range of it), but when are the bytes sent to the GPU?
Derag's user avatar
  • 596
4 votes
1 answer
5k views

DirectX 12 Constant Buffer Binding

I can't really seem to figure out how to bind two constant buffers to my shaders. I have them described like so. One in slot b0 and the other in slot b1. ...
Andrew Wilson's user avatar
4 votes
1 answer
181 views

What causes buffer access to be significantly slower in DXIL than SPIR-V?

I am currently experimenting with unbounded descriptor arrays and ultimately want to use bindless descriptors. I wrote a test application, that draws 100.000 simple object instances, where the ...
Carsten's user avatar
  • 141
3 votes
1 answer
185 views

What mechanisms are being used by Directx12 and Vulkan APIs in order to communicate with graphic card drivers internally?

I am trying and learning to develop a low level graphics API. I want to know, how do modern graphics APIs manage to communicate with graphic card drivers (to tackle GPU) so efficiently and in an ...
Buddhika Chaturanga's user avatar
3 votes
1 answer
995 views

Can D3D12 resource barriers be used to synchronize between the compute and 3D engine?

What is the best way to synchronize resource access between the (async) compute engine and the 3d engine (aka. direct engine) in D3D 12? I found this paragraph about multi-engine synchronization on ...
George's user avatar
  • 61
3 votes
1 answer
176 views

Hlsl - registers type

Is there any difference between registers types in hlsl? For example when using register t0 for UAV will it be somehow precache ...
Derag's user avatar
  • 596
3 votes
1 answer
414 views

What's different between D3D12_CPU_PAGE_PROPERTY_WRITE_COMBINE and D3D12_CPU_PAGE_PROPERTY_WRITE_BACK, and why they're named like that?

Direct3D 12 Programming Guide section "Descriptor Heap Configurability Summary" lists different "CPU Page Properties Supported" for Shader Visible and Non Shader Visible Descriptor ...
wip's user avatar
  • 1,861
3 votes
2 answers
2k views

Using array of textures in DX12

I managed to create code, working correctly as Texture2DArray in hlsl by using single ID3D12Resource and binding it as D3D12_SRV_DIMENSION_TEXTURE2DARRAY with constant array size. ...
DirectX_Programmer's user avatar
3 votes
0 answers
170 views

Global root signature crash

I have a problem with RTPSO creation. Using local root signatures for each of rgs (ray generation shader), chs (closest hit), miss is working correctly. However, for performance sake, I want to use ...
DirectX_Programmer's user avatar
2 votes
1 answer
939 views

mipmap selection process

I wished to understand which mip map in the chain of mips is selected upon sampling a texture.Which factors it depends on.I know that it depends on the area of the texture visible. I tried a simple ...
VersesDev's user avatar
  • 129
2 votes
1 answer
1k views

DXC error when compiling PSO

I am trying to compile some really simple shaders with DXC but, when creating PSO, I get: ...
Derag's user avatar
  • 596
2 votes
1 answer
172 views

Is there an analogue of OpenGL's ImageLoadStore in DirectX 12?

I'm trying to port part of an OpenGL program into an existing DirectX 12 software, at some point in their shaders they use OpenGL ImageLoadStore in order to store information in 3D Textures without ...
Ignacio del Barrio's user avatar
2 votes
1 answer
462 views

Is it possible to bind dynamic texture samplers to a shader in DX12?

So usually texture samplers are set directly in the D3D12_ROOT_SIGNATURE_DESC structure in DX12, at least that's how I've been setting them. I was wondering if it's ...
mbl's user avatar
  • 301
2 votes
1 answer
2k views

Readback Data through Buffers

I am pretty new to the dx12 world. As a sample project I am trying to add 2 buffers and store the output in yet another output buffer. As apart of this debugging I am trying to see if the buffers that ...
Madhu's user avatar
  • 43
2 votes
0 answers
177 views

Does WebGPU Have Significant Feature/Functionality Gaps As Compared to Vulkan/DirectX12/Metal?

A friend and I are considering using webgpu native (more specifically C++ bindings) for a project. We were wondering, since WebGPU likely runs on top of Vulkan XOR DirectX12 XOR Metal at any given ...
The Floating Brain's user avatar
2 votes
0 answers
154 views

CBV, IBV and VBV byte alignment

The CBV (constant buffer view) SizeInBytes is required to be 256-byte aligned. Should the associated ID3D12Resource have a ...
Matthias's user avatar
  • 1,084
2 votes
0 answers
380 views

Corrupt values when writing and reading from the same RWTexture2D in HLSL/DirectX?

I'm playing around with DirectX 12 ray tracing, and I'm trying to read and write data to a 32-bit RGBA floating point RWTexture2DArray within a DirectX 12 HLSL shader. I'm getting weird corruption/...
b1skit's user avatar
  • 161
2 votes
0 answers
199 views

Difference between Passing Instance Data to Vertex Shader methods

I see two kinds of passing Instance Data to Vertex Shader in different Examples. 1 .Using a Uniform Buffer and filling in an array, like below ...
Erfan Ahmadi's user avatar
2 votes
0 answers
29 views

Should I use common resource bindings across all my shaders in HLSL/D3D12?

Will unaccessed bindings consume cache or bandwidth? I want to improve cache usage by splitting the per-path information in my renderer across different resources, but I also want to keep my binding ...
Paul Ferris's user avatar
1 vote
1 answer
350 views

Path tracing - cannot converge diffuse sampling + oversaturation

I'm in process of creating progressive path tracer using DX12 + DXR. I managed to create working raytracing code + pathtracing code with multiple bounces but I'm experiencing problems stated below (...
DirectX_Programmer's user avatar
1 vote
1 answer
321 views

Objects in depth buffer are always black (0.0)

My problem is exactly what titles and screenshot below says - rendered object depth value is 0.0 in depth buffer. I'm using DirectX 12. Matrices: ...
DirectX_Programmer's user avatar
1 vote
1 answer
312 views

How can I control memory for command allocators and command queues in D3D12?

The D3D12 programming guide suggests specific allocation strategies for command queues and allocators, but the creation methods for those objects operate directly on queue/allocator pointers without ...
Paul Ferris's user avatar
1 vote
1 answer
240 views

DX12 compute signature

Can i have a root signature with 3 root parameters all being of the UAV type? Because what I am trying to do is, add two buffers and put the output of that in a output buffer. In the following ...
Madhu's user avatar
  • 43
1 vote
1 answer
438 views

Compute Shader PSO Dx12

I am new to the DX12 world and I am currently trying to tweak the nbody_gravity DX12 sample, but appending or calling another Compute Shader which is to add 2 buffers to produce an output in a ...
Madhu's user avatar
  • 43
1 vote
1 answer
1k views

what is the range for NDC coordinates to be visible in directx

Hi I have a confusion in dx pipeline what is the range for a vertex to be visible? Generally for a vertex to be visible vertex shader position output must be within -1 to 1 for both x & y ...
VersesDev's user avatar
  • 129
1 vote
1 answer
289 views

How Anisotropic filtering works

I would like to understand how anisotripic filtering works in gpu. Specifically what is the minimum state in which the texture needs to be in for anisotropic filtering to work. by state of the texture ...
VersesDev's user avatar
  • 129
1 vote
3 answers
407 views

what is the output from rasterizer

what exactly does the rasterizer outputs as per my knowlage it outputs primitives rasterized as fragments which seems correct as the next step in vulkan/opengl is fragment shader but dx confuses me ...
VersesDev's user avatar
  • 129
1 vote
1 answer
335 views

Mesh-Shader and layered rendering

In the usual pipeline (vertex, tessellation, geometry and fragment shaders) the geometry can be deformed and in the geometry shader it is possible to copy the generated and deformed geometry in order ...
Thomas's user avatar
  • 1,285
1 vote
1 answer
545 views

Unbound descriptor tables and descriptors for fat root signatures

Unbound descriptor tables If a D3D12_VERSIONED_ROOT_SIGNATURE_DESC defines N D3D12_ROOT_PARAMETERs (with ...
Matthias's user avatar
  • 1,084
1 vote
1 answer
94 views

Worsening sampling quality of raytracing with increasing distance from world origin

I am using RT shader (DXR) to generate g-buffers with code below. There was no problems with smaller scene (pink room from cwyman tutorial - http://cwyman.org/code/dxrTutors/tutors/Tutor5/tutorial05....
DirectX_Programmer's user avatar
1 vote
2 answers
883 views

Writing data to a shader resource at runtime in DX12

I'm hoping to port my existing toy raytracer to a window so that I can see samples accumulate over time. And then port over to Pixar's pmj02: https://graphics.pixar.com/library/...
Trevor Black's user avatar
1 vote
0 answers
24 views

How do I access vertex buffers corresponding to different (bottom level) acceleration structures?

I want to render scenes like they are used in mitsuba or pbrt (see https://benedikt-bitterli.me/resources/ for example scene description files). That is, I have a list of obj-files. Each Obj file ...
0xbadf00d's user avatar
  • 203
1 vote
0 answers
73 views

Imprecise TEXCOORD interpolation of a screen quad in DirectX

I was debugging with RenderDoc an issue on an app based on Directx11 and 12 that draw screen space quads to perform various baking steps. These baking steps just render a quad in clip space without ...
Michele M.'s user avatar
1 vote
0 answers
760 views

DX12 Debug Layer doesn't output detailed error information

When I use the CreateGraphicsPipelineState function in DX12, there's an error "E_INVALIDARG One or more arguments are invalid." returned by the function, but there isn't detailed information ...
typpe C's user avatar
  • 11
1 vote
1 answer
67 views

Texture value clamped to 1

I am working on ray/path-tracer using DXR and I'm starting with simple AO. In first pass, I am storing normal value and RayTCurrent(): ...
DirectX_Programmer's user avatar
1 vote
0 answers
161 views

D3D12EnableExperimentalFeatures causes D3D12CreateDevice to fail

I am following Nvidia's DXR tutorial: D3D12HelloTriangle. I call below code before creating device and it returns true ...
ali's user avatar
  • 740
1 vote
1 answer
1k views

DirectX 12: Uploading multiple buffers to 1 default heap using the UpdateSubresources API without explicit copies

Consider a situation where there are 3 different buffers describing a particular mesh piece: vBuffer, nBuffer, ...
deadpin's user avatar
  • 13
0 votes
1 answer
663 views

Do we really need a fence event?

One of the hardest things for me with the modern closer to the metal graphics APIs is understanding synchronization. I usually try to simplify things in order to understand the concept better. In ...
Nacho's user avatar
  • 110
0 votes
1 answer
415 views

Generate Hi-Z buffer using single PSO and single UAV

I'm currently implementing SSR in my engine and I've created Hi-Z buffer using multiple PSOs in way presented below: Create descriptor table with multiple UAV entries (this case - 3 entries for Mip 0,...
DirectX_Programmer's user avatar
0 votes
1 answer
20 views

Empty texture passed down to GPU in DirectX12

I'm having a problem with loading texture in DX12 with DirectXTK. It seems to be loading all the metadata, since in PIX, I can see bound resource with correct width/height and format. But it's ...
DirectX_Programmer's user avatar
0 votes
0 answers
46 views

Problems with distributed ray tracing and particle system

based on the ray tracing stunning effect, I'm considering a resilient distributed ray tracing implementation, I've just finished a basic computer graphics course, and I'm currently working on directX ...
Haitao Xiao's user avatar
0 votes
0 answers
57 views

How to use unbound descriptor range properly in descriptor tables

I am trying to use 2 "D3D12_DESCRIPTOR_RANGE" in a root descriptor table,defined as follows: ...
VersesDev's user avatar
  • 129