Jump to content

  • Log In with Google      Sign In   
  • Create Account

nikitablack

Member Since 12 Apr 2010
Offline Last Active Feb 08 2016 04:31 AM

Topics I've Started

[D3D12] Is ExecuteCommandLists asynchronous, does Present stalls, how signalling works?

11 January 2016 - 04:52 PM

Hello,

 

I'm reading and reading about dx12 but still have some problems with understending basic concepts. I'm an active reader of this section of the forum but still can miss something. Please redirect me to the correct place if my questions are duplicate. So, here's a msdn Hello World example.

  1. The method OnRender(). We populated a command list and executed it with ExecuteCommandLists() method. The documentation says: "Submits an array of command lists for execution.". Not a lot sad.png. I bet the commands doesn't send immediately, right? What is happening during a travel of command list from CPU to GPU, a stall?
  2. Next a method Present(). But what is happening here? CPU stall again? What if it called when commands are not finished and there's nothing to present?
  3. Next we're synchronizing by calling first ID3D12CommandQueue::Signal(). Is it possible this command execute before ExecuteCommandLists() (if ExecuteCommandLists() is asynchronous) and the signal become before or in the middle of the supplied commands?​
  4. Next we're waiting:
    if (m_fence->GetCompletedValue() < fence)
    {
       ThrowIfFailed(m_fence->SetEventOnCompletion(fence, m_fenceEvent));
       WaitForSingleObject(m_fenceEvent, INFINITE);
    ​}
    

what if fence was updated immediately after GetCompletedValue() but before SetEventOnCompletion()? Isn't it a data race?


Does OMSetRenderTargets() is the same as having D3D12_RESOURCE_STATE_RENDER_TARGET barr...

12 October 2015 - 02:04 AM

Hello.

 

In d3d12 I noticed that if I have a barrier with Transition.StateAfter = D3D12_RESOURCE_STATE_RENDER_TARGET and later clear the render target with ClearRenderTargetView() - everything works even without calling commandList->OMSetRenderTargets() - I can see the correct window color even when I have several buffers. Is it correct or I missed something?


D3D12 debug layers. How to get ID3D12DebugDevice?

05 October 2015 - 05:51 AM

Greetings.

 

1. Documentation for ID3D12Debug says:

This interface is obtained by querying it from the ID3D12Device using IUnknown::QueryInterface.

 

But all the examples are using

D3D12GetDebugInterface()

And after all how can I obtain it from a device if there're no flags anymore pointing that the device is debug?

 

2. How to get ID3D12DebugDeviceID3D12DebugCommandListID3D12DebugCommandQueue?


D3D12 warp driver on windows 7

02 October 2015 - 02:41 AM

Hello.

 

By some reason I'd like to use dx12 on windows 7. I thought I can just use warp driver dll - after all it's just a software implementation (which proves why it works on win10 with wddm less than 2.0). With Dependency Walker I checked which libs I need. I grab this libs on win10. But this is not enough - it seems that libs require another libs and it's hard to tell which. So maybe somebody already managed how to do this? Or maybe I'm totally wrong and it's impossible to achieve?


DirectCompute - set numthreads from application code (or read from shader).

23 September 2015 - 01:38 AM

Hello.

 

In my application (C++ side) I need to know the total number of threads that will be used in compute shader. Right now I have this numbers in two places - on C++ side and inside shader. When I need to change a value, I need to do it twice and we all know this is bad. Is there a way to pass this data from C++ to shader or vice versa?


PARTNERS