Questions tagged [direct3d12]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
44 views

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

I'm new to DXR, so please If I got it right, when we want to compile a ray tracing shader using the DirectX Shader Compiler, we need to specify lib_6_* as the ...
0
votes
1answer
56 views

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

I've noticed that I cannot specify a root signature in the HLSL code of a DXR shader. For example, if I got a ray generation shader with the following declaration ...
2
votes
0answers
31 views

How to get struct layouts from vertex shader input using ID3D12Reflection

I am attempting to write a code generator that builds C++ structs/classes from D3D12 reflection data built using DXC. Given a simple vertex shader signature: ...
0
votes
1answer
20 views

DX12 - how to update part of a buffer?

I'm just getting started in DX12 after a bit of time in Vulkan, I am trying to update a part of a dynamically indexed buffer I'm using to hold mesh transforms. I'm using the MSFT MiniEngine examples ...
0
votes
1answer
63 views

Difference between shader input element classification between D3D12 and Vulkan

I'm confused about the difference between the shader input element classifications in D3D12 and Vulkan. For example, in Vulkan I could have the following declarations: ...
0
votes
1answer
54 views

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

Most objects in DirectX 12 have natural analogues in Vulkan, e.g. VkInstance = IDXGIFactory ...
0
votes
1answer
417 views

Howto use the depth buffer in DirectX 12

To make things short: I am trying to bind and use a depth buffer in D3D12, but it is not working. The depth buffer gets created and bound properly (I can see it in nsight graphics) but does only take ...
0
votes
1answer
266 views

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

From Microsoft Docs, I can specify the root signature of my shader in HLSL. How do I use it though? Since at the beginning of the command list, root signature is undefined. I need to use ...
0
votes
1answer
672 views

DirectX12 root signature error while using compute shader with ConsumeStructuredBuffer

I am getting this error: I do not have CBV, but it looks like I am forgetting to bind a CBV. D3D12 ERROR: ID3D12Device::CreateComputePipelineState: Root Signature doesn't match Compute Shader: ...
1
vote
1answer
234 views

How can I write a D3D12 texture in cuda?

One point about such pipeline is that everything happens in GPU and bypass the CPU. The texture is created as such: ...
1
vote
1answer
30 views

What is the difference between cudaExternalMemoryHandleTypeD3D12Resource and cudaExternalMemoryHandleTypeD3D12Heap?

When we import a D3D12 memory object into cuda we do something like this: ...
0
votes
1answer
92 views

How to get DXGI_ERROR description?

In a D3D12 program, I encounter a DGXI_ERROR (CreateSharedHandle return an int <0), but I ...
0
votes
1answer
939 views

Resize window in D3D12

I am trying to implement the d3d12 window resizing function. First, I delete all the buffers referenced by SwapChain, and then run SwapChain :: ResizeBuffers. At this point I get the error: ...
0
votes
0answers
121 views

Array textures on Pixel shader

I'm developing on D3D11 and D3D12 in parallel. D3D12 is really difficult, but I learn it gradually. I faced a problem such as passing an array of textures to a vertex Shader. The method ...
0
votes
0answers
65 views

Shader code not working

While compiling the following code. I get a error ...
1
vote
1answer
68 views

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

I could not figure out the difference between for instance CD3DX12_DESCRIPTOR_RANGE and CD3DX12_DESCRIPTOR_RANGE1. Why do both exist? Which should I use? Is there a general rule of behavior/usage/...
0
votes
1answer
227 views

D3D12CreateDevice(pAdapter, D3D_FEATURE_LEVEL_12_0) ISSUE

I'm getting this error when I compile this code. D3D12CreateDevice(pAdapter, D3D_FEATURE_LEVEL_12_0, IID_PPV_ARGS(&pDevice)). Error! No such Interface supported I've got a rtx 2060 GPU installed ...
0
votes
0answers
18 views

Directx Ray Tracing Dxr Support Application Issue

I have a question, I have source code that is old that was built in visual studio 2003 and It does not allow me to compile DirectX12 code in visual studio 2003 so my Attentions was to take my old game ...
0
votes
1answer
304 views

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

I'm using a variant of the D3D12 UWP template that comes with VS2017 Community Edition and I have two related questions: When I add this italicized and bolded code to the vertex shader signature, I ...
0
votes
1answer
192 views

Rendering PhysX Primitive Geometry in DirectX 12

I created a scene with two primitive geometries (Sphere and Box). Now I want to recreate what I see in the scene (PhysX Visual Debugger) in my game engine window, but I can't find any functions that ...
1
vote
1answer
995 views

Why are committed resources better than placed resources?

This NVIDIA document regarding dos and don'ts in DirectX 12 states the following: Use committed resources where possible to give the driver more knowledge This allows the driver to better ...
0
votes
1answer
256 views

Directx 12 Root signature compatibility with pso

Can you bind a different root signature than the one that pipeline was created with? If so does it have to have exactly the same parameters or could it have like one more but the pipeline will ignore ...
3
votes
0answers
138 views

Are GPU drivers hand optimized for specific games using low-level APIs?

The GPU drivers often have slightly different behavior depending on game or program, which is using them. It optimizes performance, bypasses bugs and improves overall experience in popular games, ...
1
vote
1answer
910 views

DX12 Passing an Instance Buffer

I'm trying to take the DX12 Cube Demo that comes with VS2017 Community and draw three cubes instead of one. Unfortunately, the VertexShader doesn't seem to be getting my instance data. In my ...
0
votes
1answer
998 views

How do I draw text using DirectX 12?

I'm currently tasked with porting a control from Direct 11 to DirectX 12. How do I draw text on the screen? How do I draw any 2D on a DirectX 12 device? Current Text rendering code is below: <...
0
votes
0answers
270 views

Crash on creating pipeline state - “the parameter is incorrect” - HRESULT 0x80070057

All input appears valid, although the DirectX12.ShaderByteCode() pointer is null - I don't know if that's indicative of anything; the buffer does contain data. Edit: Diagnostic hub output: ...
1
vote
1answer
138 views

CreateGraphicsPipelineState

Hi! Would someone answer my question, please? Does the title's method create the same components always or verify possible duplicates? For exaple: I have one D3D12_INPUT_LAYOUT_DESC struct and two ...
0
votes
1answer
250 views

Direct3D 12 STATE_CREATION ERROR #649: CREATE_CONSTANT_BUFFER_VIEW_INVALID_RESOURCE

Every time my constant buffer helper creates the "Constant buffer view" with the CreateConstantBufferView method i get an error which states: D3D12 ERROR: ...
0
votes
1answer
170 views

How do I know my VRAM upload is ready to be used?

Previosuly in Direct3D 9 and 11, if I wanted to update a resource in a Default heap, for example, a Vertex Buffer, I would lock the memory of the buffer, copy the data to the returned pointer, and ...
0
votes
1answer
1k views

Accessing UAV data in a Pixel Shader SRV

I'm working with a basic compute shader which only task is to modify the input color of an UAV. This UAV data should then be passed to an SRV in a pixel shader which should then output this color. The ...
0
votes
1answer
582 views

CreateShaderResourceView fails because of plane slice

I'm trying to write a wrapper for the CreateShaderResourceView method inside my Texture class, which shouldn't be any problem at all since everything was working ...
3
votes
1answer
2k views

Direct3D 12 can't create a swap chain

I'm learning DirectX12 and I'm trying to create a simple application that clears the screen with a solid color, but I'm stuck in Direct3D initialization. I can't create the swap chain and the ...
0
votes
2answers
207 views

When the book talk about CreateSamplerState in D3d11, what I have to do in D3d12?

I want to build a virtual earth, so I read the book '3D Engine Design for Virtual Globes' by Patrik Cozzi and Kevin Ring. But the book talk the CreateSamplerState in D3d11.I havn't used D3d11, I just ...
0
votes
0answers
1k views

How to update vertex buffer in DirectX 12

I would like to create cloth simulation. Which type of buffer should i use for vertices. I will need to update them on every frame. And how updates need to be done. I'm new to graphics programming, ...
1
vote
1answer
377 views

How to draw HUD in DirectX12?

I would like to draw reference frame to see how my camera moves around scene. I want these arrows to always be on the top of other geometry. How can I achieve it? I think I need to disable depth test ...
2
votes
2answers
1k views

DirectX 12 and Feature levels

As far as I know the DirectX12 SDK that comes with the Windows 10 SDK can only be used on a Windows 10 machine. Although I'm not entirely sure about the runtime and the use of future levels (which ...
-1
votes
1answer
1k views

unable to create a IDXGIDevice with D3D12CreateDevice()

I was trying to do a bare bones simple build similar to some Directx samples. First I have to use __uuid() instead of ...
-2
votes
1answer
1k views

DirectX 12 using Visual studio 2015 on Windows 7 SP1

I'm trying to work with a directx 12 sample using windows 10 sdk, visual studio 2015, on windows 7 SP1. I get the following error The procedure entry point CreateFile2 could not be located in the ...
0
votes
1answer
308 views

Directx 12 Vertex buffer/shader question

Is there a way to process individual vertex that get pumped into the vertex shader. I have a cube and pyramid. I want to multiply a different worldviewproj matrix for the cube. So the first 8 vertex ...
3
votes
1answer
676 views

Dynamic Shader Linkage in DirectX12?

Do the dynamic shader linking concepts introduced in DirectX11 ShaderModel 5.0 still work in DirectX12? In the documentation the reflection API is still available (e.g. ...
0
votes
1answer
402 views

D3D12 ConstantBuffer - Shader receives wrong values

im having trouble with one constantbuffer: ...
0
votes
2answers
913 views

D3D12 device not supported

In the last days, I tried to learn the basics of Direct3D12, using some online resources and tutorials/demos. After failing to run the demos, I created a new project in Visual Studio 2015, added the ...