Jump to content


Member Since 13 Nov 2008
Offline Last Active Mar 06 2017 08:57 AM

Posts I've Made

In Topic: DirectX 12 few notes and questions

14 February 2016 - 07:14 AM

To explain a bit more in-depth... AMD GCN hardware only allows you to pass 16 DWORD values (64 bytes) as the arguments to a shader. The root signature describes a structure that can fit into this 64byte area.

It's maybe worth to add, that the root signature has a limit of 64 DWORDs. So it can easily overflow the 64 byte limit GCN hardware sets for user data registers. Therefore it's a good idea to keep the root signature size small (at least on this hardware). Otherwise parts are spilled in 'slower' memory and a additional indirection is needed for resolve.

In Topic: DX12 - RenderToTexture / CommandLists

01 February 2016 - 02:28 AM



In general there is no state inheritance between two different direct command lists. It is expected that the full set of states (PSO and non-PSO states) is recorded within a direct command list. There are some options to ease this a bit, initial PSO states can be specified with the pInitialState parameter at creation time (CreateCommandList), if non is specified a default PSO is used instead. All non-PSO states need to be recorded (RSSetViewports, IASet***Buffer, OMSetRenderTargets, ...). 


With this in mind, you can try to adapt the way you record the command lists to it. If you split rendering of many objects (of the same render-pass) in different command lists you need to specify the render-states per command list, even though it might seem redundant. So your example from above would sadly not produce the intended behavior. 


For bundles the set of rules are of course a bit different. For more info read Graphics pipeline state inheritance

In Topic: DirectX evolution

08 January 2016 - 01:48 AM

But if for some odd reason you're batch limited even in D3D11/12, the general thinking from the batch, batch, batch presentation still holds (i.e. batch limited = increasing vertex count becomes free). For example to combat batching issues, Just Cause 2 introduced the term merge-instancing.


Also, not to forget in this regard, the technique(s) used in AC and Trials as presented last Siggraph (GPU-driven Rendering Pipelines)

In Topic: DirectX 12 issues

11 June 2015 - 04:19 AM

Hi DarkRonin,


you might want to take a look at this thread: http://www.gamedev.net/topic/666986-direct3d-12-documentation-is-now-public/. There are floating a couple of simple example codes around. 

In Topic: DirectX 12 problems creating swap chain

11 June 2015 - 04:14 AM

Hi DarkRonin,


note that the first parameter of CreateSwapChain expects a command-queue not the device (even though the parameter name suggests this). Also note you should pass a DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL in the SwapEffect field of your description (and therefore use 2 buffers). Also you should definitely specify the sample desc (like count=1, quality=0).


Also try to enable the debug layer, so validation errors are logged directly to the visual studio output window:

ComPtr<ID3D12Debug> debugInterface;
if (SUCCEEDED(D3D12GetDebugInterface(IID_PPV_ARGS(&debugInterface))))