5,941 questions
-3
votes
0
answers
61
views
How come my single-adapter windowed Direct3D application renders on either monitor on a dual GPU system?
I have a dual-GPU laptop which is connected to a large external monitor. The built-in monitor of the laptop is associated with the integrated GPU (iGPU), while the the external monitor is associated ...
0
votes
0
answers
141
views
Direct2D in WPF: what am I doing wrong?
I am using Vortice to draw Direct2D graphics in a WPF window.
I have been able to make it work using Vortice.Direct2D1.ID2D1Factory8.CreateHwndRenderTarget() , but this works with a HWND, so it ...
Advice
0
votes
6
replies
157
views
Why use references to modify the value of a variable?
Please see line 33~36:
Why use references to modify the value of a variable? (line 33~36).
Here is my code, I think they are the same.
D3D12_RESOURCE_BARRIER resourceBarrier = { };
resourceBarrier....
2
votes
2
answers
53
views
How to handle negative texture coordinates in a CPU raytracer
Years ago I implemented a CPU raytracing software and things work properly. I then implemented a DirectX 12 viewer. I just found out there is some discrepancies between my 2 implementations when i t ...
0
votes
0
answers
37
views
D3D12 root descriptor binding breaks when reordering root parameters or adding resources
I'm running into a weird issue with D3D12 root signatures and root descriptors.
Right now I have a setup like this:
Shader:
ConstantBuffer<frameConstants> frameConstantsData : register(b0);
...
1
vote
1
answer
103
views
Solve Vendor and Device Ids to Names in C#
If I have the following code, how would I need to implement the ResolveXIdToXName methods?
So far I havent been able to get my hands on a easy to use library or API to quickly send this to and resolve ...
2
votes
1
answer
45
views
Can RootConstants defined in HLSL have their visbility limited to more than 1 shader type but not all?
I want to define a root signature like the following
[RootSignature("
RootFlags( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT | DENY_HULL_SHADER_ROOT_ACCESS | DENY_DOMAIN_SHADER_ROOT_ACCESS ),
...
1
vote
1
answer
128
views
DirectX Agility SDK, guid symbols
I am using the DirectX Agility SDK to ship D3D12Core.dll and d3d12SDKLayers.dll along my exe.
Currently I use the Windows SDK, C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\dxguid.lib ...
Best practices
1
vote
2
replies
54
views
Is there a way to force iFlip mode from my application?
We have created a UI framework using DirectX and Win32 APIs. Recently we started using iFlip mode. But with iFlip mode DWM automatically switches back to iFlip mode from composited mode, when a popup/ ...
Advice
1
vote
2
replies
84
views
Is optimization done at graphics pipeline creation time between stages?
The reason I'm asking this question is because I have cases in a vertex shader where I have:
layout (location = 0) out float3 outEyeSpacePosition;
layout (location = 1) out float2 out_tex_coords;
And ...
3
votes
1
answer
137
views
Flickering when drawing to IDCompositionSurface
I tried drawing a rounded rectangle via the renderTarget, but encountered an issue where the image disappears every other frame—what could be the cause?
#include <d2d1_1.h>
#include <d2d1_2.h&...
3
votes
2
answers
160
views
What does a min filter do on the same mip level?
In a graphics API like Vulkan, you have VkFilter, which can be NEAREST or LINEAR. Leaving aside the mipmap filtering, which is another thing altogether, I'm trying to understand what the point of the ...
-2
votes
1
answer
234
views
DirectX debug layer dll version mismatch
I was learning directx by https://github.com/d3dcoder/d3d12book, and at one point, it suddenly started not working in Debug mode like this.
So I asked github copilot and he said that the problem was ...
1
vote
1
answer
161
views
Non-uniform access by indexing vs non-uniform access from a switch case or if-else statement
This question is supposed to be in the most general sense possible, this is because I'm using the Slang shading language to apply potentially to multiple graphics APIs.
In OpenGL and Vulkan the ...
1
vote
0
answers
105
views
How to force allocated D3D12 resource to reside in VRAM and not be demoted to shared RAM?
For testing purposes I need a tool that will occupy some amount of VRAM, leaving a reduced available VRAM to the rest of the applications. I implemented a version that somewhat works using D3D12 API, ...