Questions tagged [directx-12]

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 ...

0
votes
1answer
16 views

Sharing ID3D11Buffer and ID3D12Resource

In D3D11/D3D12, Is it at all possible to share an ID3D11Buffer with an ID3D12Resource one way or the other? I know it's possible to share ID3D11Texture2D, but it seems like ID3D11Buffer sharing across ...
0
votes
1answer
28 views

dx12 open 4x msaa failed

I am just learning "introduction to 3D game programming with DirectX 12".Running the example code in initialize d3d(chapter 4),when I wanna use 4xmsaa,something wrong was happened,like the follow ...
0
votes
0answers
32 views

Direct3D12 resource state decay

I have a constant buffer, created with the initial state of D3D12_RESOURCE_STATE_COPY_DEST. I find that when I use the constant buffer, I never need to track the state of the resource, and the ...
1
vote
1answer
29 views

In DX12 what Ordering Guarantees do multiple ExecuteCommandLists calls provide?

Assuming a single threaded application. If you call ExecuteCommandLists twice (A and B). Is A guaranteed to execute all of its commands on the GPU before starting any of the commands from B? The ...
0
votes
0answers
18 views

How can i change model in D3D12Raytracing-miniengine?

I got the ray-tracing source code from this address (https://github.com/Microsoft/DirectX-Graphics-Samples/blob/master/Samples/Desktop/D3D12Raytracing/src/D3D12RaytracingMiniEngineSample/readme.md) ...
0
votes
0answers
10 views

What is the difference between BVH-aligned Acceleration Structures and DirectX 12 Acceleration Structures?

DirectX 12 Acceleration Structures already know that they are ordered by BVH. But what if DirectX 12's Acceleration Structures differ from the algorithms that Kay and Kajiya created?
1
vote
1answer
52 views

Exception when creating Swap Chain with CreateSwapChainForComposition

I am trying to render DirectX12 in SwapChainPanel by using SharpDx but creating a SwapChain fails for an unknown reason. Here is a simplified version of what I have: // select adapter based on some ...
0
votes
0answers
79 views

Is it possible to use nvidia Nsight to debug cppwinrt directx12 applications?

I have a UWP cppwinrt app that is using directx12 to render a cube with a basic shader. I would like to use a graphics debugger to inspect the data being sent to this shader. First I am trying to ...
0
votes
2answers
63 views

E_INVALIDARG when calling CreateGraphicsPipelineState

I've been getting a weird error when calling CreateGraphicsPipelineState(). The function returns E_INVALIDARG even though the description is all set up. The description worked before and the I tried ...
0
votes
0answers
66 views

DirectX12 - PerObject vs a combined single constant buffer

So I am using DX12 to work on a project and getting a conflict between tutorials/books and just previous learning from university. so a tutorial gives this comment: We have two objects in our scene, ...
0
votes
0answers
53 views

Octree frustum culling vs Linear culling?

I want to integrate frustum culling into my little engine.so i implemented culling using two algorithm as title.One of algorithm is linear culling. for(i in all objects) test(i); and other one ...
0
votes
1answer
48 views

Setting D3DImage to Image and Rendering in WPF

I would like to render to a surface using DX12 and present it through WPF. There are claims on the web that this is possible. To me it seems simple. I can render as a traditional image(ie tga) on hard ...
0
votes
1answer
57 views

SetGraphicsRootDescriptorTable gives ambiguous error

One of my calls to SetGraphicsRootDescriptorTable returns the following error: D3D12 ERROR: CGraphicsCommandList::SetGraphicsRootDescriptorTable: The descriptor heap (0x052184B0:'m_lightBufHeap') ...
0
votes
0answers
13 views

Does DX12 supports AMD Firepro GMA feature?

There is a requirement of using the AMD FirePro GMA feature in one of my R&D project. Platform: Dx12, windows 10 I couldn't get the AMD SDK for this. Even AMD APP SDK 3.0 didn't includes any ...
5
votes
0answers
199 views

What does it mean that DX12 has heterogeneous multi GPU support and Vulkan doesn't?

I've been looking into using vulkan to leverage compute capabilities on integrated graphics and discrete graphics capabilities. However, according to this article, despite having multi gpu support ...
1
vote
1answer
82 views

Porting Directx12 Asset into XAML element: advice on WRL::ComPtr replacement?

I'm working on creating a WPF asset (like D3D11Image), from a DirectX12 Win32 desktop sample : D3D12PipelineStateCache, so I can embedd it as XAML element in a WPF application. Microsoft Directx12 ...
1
vote
1answer
189 views

Entity Component System - Rendering approach

I am currently working on a small project using ECS and DirectX12 and wanted to get some advice on if there is a "preferred" way or alternative ways to solving my issue. Let me give a very basic ...
0
votes
1answer
64 views

Effects11d.lib file, DirectX11 on visual studio 2017/2015

Nowdays my team study DirectX11 with book which name is introduction to 3D game programming with DirectX11. we are trying to set up our visual studio(ver 2017, 2015) as the book says. But we failed ...
0
votes
0answers
105 views

C++ project MSTest gives the error: Message: Failed to set up the execution context to run the test

I'm running unit tests on a C++ project and when I switch the build target from the DX11 version to the DX12 version, all the unit tests start giving the following error: Message: Failed to set up the ...
0
votes
1answer
121 views

Error about function Interlockedadd under RWTEXTURE2D.(HLSL)

I got a problem about intelockeded in HLSL compute shader. Here is my Code RWTexture2D<uint> TileNum:register(u0); //Texture size is same with all group size(Context->Dispantch(x,y,z)) [...
0
votes
0answers
24 views

DirectX 12 upload heap allocation on multi socket numa systems

does anyone know if it somehow possible to allocate with CreateCommittedResource an upload heap that resides in the memory of CPU 2? We have a dual socket Xeon v4 system, and to each CPU there is a ...
0
votes
1answer
258 views

Multiple constant buffer - register - dx12

I learn dx12 with that tutorial : https://www.braynzarsoft.net/viewtutorial/q16390-directx-12-constant-buffers-root-descriptor-tables#c0 I tried to modify this step to got 2 constant buffer (so a ...
1
vote
1answer
116 views

D3D12 Use backbuffer surface as 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 ...
-4
votes
2answers
281 views

Error C2679 binary '=': no operator found which takes a right-hand operand of type 'int' (or there is no acceptable conversion)

I'm trying to make a dynamic array in C++ using DirectX 12. I found a good one on here made some miner changes because it was created for DirectX 11. I get this error when I run it. Severity Code ...
0
votes
0answers
79 views

How to reuse a committed resource as a stream out buffer in DX12 after reading it back

To help debug my graphics pipleine I want to streamout my shader inputs on demand (via a key combination). I have created a committed resource that I am using as a stream output target in DX12 as ...
0
votes
0answers
39 views

DX12 Multiple lights instanced draw

I have a sphere that I draw using DrawIndexedInstanced (after setting the vertex and instance buffer) In the shader I use SV_InstanceID to know which instance I am drawing and grab the correct ...
0
votes
1answer
56 views

Why does my background flicker through my meshes in DirectX 12 Release build?

I have been developing this game in C++ in Visual Studio using DirectX 12. I used the Debug build configuration during development and the graphics were smooth as butter. When I was preparing to ...
-1
votes
1answer
56 views

How to wrap a video on a monitor?

If I have a video file that defines a video image that is 6144 pixels long (x) by 64 pixels high (y) and I want to display that video so that it wraps at the end of the monitor. In other words I want ...
0
votes
0answers
32 views

Inner workings of Shared Heaps (DirectX 12)

I am curious about the way memory is handled in interprocess shared heaps. More details can be found here: My main concern is when I send my data (e.g. texture) from one process to the other (both ...
2
votes
0answers
160 views

Using Tensorflow in a low-latency high-throughput kinda way

Processed data is real-time video (a bunch of sequential frames) and it all needs to end up in a DX12 buffer. I don't care too much if data gets copied to system memory during training, but during ...
0
votes
0answers
43 views

DirectX12 swap creation failed [duplicate]

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 DXGI ...
0
votes
2answers
178 views

which header file contains ThrowIfFailed() in DirectX 12

some part of code image, another part of code image, I am beginner to DirectX 12 (or Game Programming) and studying from Microsoft documentation. While using function ThrowIfFailed() I get an error ...
0
votes
1answer
81 views

Direct3D12 failed to call ClearRenderTargetView

Source code: https://github.com/AinoMegumi/Direct3D12 I'm trying to init Direct3D12 Window. In function Direct3D12::OnFrameRender (watch source code above, Direct3D12.cpp line 251), void ...
0
votes
0answers
206 views

DirectX 11 Blending

How can i access pixel colors of destination pixel in pixel shader, in order to use my specific blending equation, when control goes to pixel shader i only have the source pixel position and color, i ...
2
votes
1answer
688 views

Convert DXBC to DXIL (DirectX Bytecode to DirectX Intermediate Language)

Microsoft's open source DirectX Shader Compiler describes the format of a new intermediate language (IL) for HLSL shaders called DXIL. The documentation makes reference to a converter from the ...
0
votes
1answer
109 views

DX12, How to implement a standard texture class?

I'm working on the texture class of our engine and I came across one problem. Our API supports different actions like updating some texels of the texture and reading data from the texture. This ...
1
vote
1answer
81 views

API abstraction layer - avoid mixing of API interfaces

I've been planning on writing an API abstraction layer for my rendering engine. The two APIs I want to include are D3D11 and D3D12. So I started by writing some interfaces and their respective ...
1
vote
1answer
349 views

How to use multisampling on Direct x12

I have a question as to how to use multisample anti-aliasing (MSAA) on Direct x 12. I was unable to find an example on the web. What I've seen around is that is not possible to directly enable MSAA ...
0
votes
2answers
596 views

Vulkan: Is there a way to draw multiple objects in different locations like in DirectX12?

In DirectX12, you render multiple objects in different locations using the equivalent of a single uniform buffer for the world transform like: // Basic simplified pseudocode SetRootSignature(); ...
2
votes
0answers
58 views

HLSL (compute shader, shader model 5_1) conundrum

So I had this HLSL structure that compiled successfully in VS2015 when used: struct SpatialHashingCellData { uint count; uint specks[MAX_SPECKS_PER_CELL]; }; It was used like this: ...
1
vote
2answers
172 views

Why convert to XMFLOAT instead of using XMVECTOR directly?

While studying DirectX 12, it says that I should use XMFLOAT instead of XMVECTOR for class data members. I do not understand why. Is it wrong that defining the XMVECTOR variables in my class? or ...
0
votes
2answers
278 views

D3D12 Dynamic indexing of textures with different formats

In shader model 5.1 we can use dynamic indexing for textures like so: Texture2D textures[5] : register(t0) PixelShader(Input p) : SV_TARGET { float4 color = textures[0].Sample(someSampler, p.UV);...
1
vote
1answer
150 views

Attempting a “minimum viable” SharpDX 12 setup; error 0x887A0005 “device removed”

The goal: Write "minimum viable", no frills or extras code that sets up SharpDX 12 (a C# wrapper around DirectX 12), creates a window, and executes a present loop that clears the screen to RGBA (0, 0, ...
0
votes
0answers
148 views

DX12 - Descriptor Heap Optimal approach

I have been working on building a DX12 renderer. Currently after looking at many examples (Mini Engine, BGFX,...) I think I finally found the optimal solution for descriptor binding. Here is the ...
1
vote
1answer
162 views

Direct x 12 image flickering on Intel graphic hard

I have a weird issue only happening on my Intel HD Graphics 530 When rendering an image, some pixels color randomly change. See the following image: Bug For the problematic pixels, the graphics ...
0
votes
1answer
60 views

Image Normal map to DirectX 9-12

I have a question for you because I really need this and I have no idea how can I solve it. Is it any possibility to convert a Normal map image into a NormalBuffer? Or in other words... I want to ...
4
votes
1answer
264 views

DXGI Waitable SwapChain not waiting

I setup a DX12 application that only clears the backbuffer every frame. It really is barebone : no PSO, no root... The only particularity is that it waits on the swapChain to be done with Present() ...
0
votes
1answer
281 views

Compute Shader writing to RWStructuredBuffer randomly from multiple thread groups

I am trying to implement random access reads and writes to RWStructuredBuffer from multiple thread groups. The race condition can occur when there are two threads (on different thread group) running ...
0
votes
1answer
302 views

How to switch between background colors in DirectX

What I want? To switch as fast as possible between 2 background color ( lets say white and red ) to be more specific, I want the screen always be white and for 1 frame ( this has so short ) be red ...
1
vote
2answers
127 views

Which int implementation to use? [duplicate]

I am programming a video game engine in c++, using the DirectX 12 API. By doing so I discovered the data type __int64, which is apparently a Microsoft specific sized type. Therefore two questions came ...