dx12 - dynamically indexable resources -what exactly it means?

Started by
5 comments, last by Alessio1989 9 years, 8 months ago

"In addition to the improved performance offered by descriptor heaps and tables, Direct3D 12 also allows resources to be dynamically indexed in shaders, providing unprecedented flexibility and unlocking new rendering techniques. As an example, modern deferred rendering engines typically encode a material or object identifier of some kind to the intermediate g-buffer. In Direct3D 11, these engines must be careful to avoid using too many materials, as including too many in one g-buffer can significantly slow down the final render pass. With dynamically indexable resources, a scene with a thousand materials can be finalized just as quickly as one with only ten."

link

Does this means we will be able to bind lots of textures to a shader and than based on a drawable material (cb variable) pick the correct texture (index to texture) ?

Say I have a 2d game and I managed to put all my images on only 3 texture atlas, can I bind the 3 textures and never worry about textures again, as my sprites material will have an index to texture, being able to draw everything w/ a single draw call.

Did I get it all wrong?

Advertisement

Yes, that's correct: it allows a shader to dynamically select a texture without having to use atlases or texture arrays. However there may be performance implications for doing this, depending on the hardware.

Thats awesome.

Doesn't that mean if we stuff all vertices and indices into single buffer (along with texture indexes) theoretically it'll be possible to render whole scene in a single draw call (assuming everything uses same shader)?

Yes, but at the same time, draw-calls will no longer be a source of excessive CPU-side overhead, as in current APIs (D3D9 < GL < D3D11 < D3D12/Mantle).

You can do that on some GL drivers at the moment by using MultiDrawIndirect and bindless resources.

Modern hardware doesn't actually have a fixed-function Input Assembler any more -- instead the logic for reading vertex data from buffers is implemented inside the vertex shader code (the driver prepends this code onto your shaders)... So in theory you could even still have stuff in different buffers if you wanted to, and then implement the logic to pick the appropriate buffer in the VS wink.png

I have a gtx 260m, a d3d10 card, so D3D11 is used with d3d10 feature level. Will feature levels still apply with D3D12? Or Im pretty much screwed?

"DirectX 12 (and D3D 12) are backwards compatible with virtually every single GPU from the GTX 400 to the present day."link

So, d3d10 is about to be dropped together with windows xp?

I have a gtx 260m, a d3d10 card, so D3D11 is used with d3d10 feature level. Will feature levels still apply with D3D12? Or Im pretty much screwed?

"DirectX 12 (and D3D 12) are backwards compatible with virtually every single GPU from the GTX 400 to the present day."link

So, d3d10 is about to be dropped together with windows xp?

According to Max McMullen, Direct3D 12 will have feature levels, at least something like a feature level 11.0 (and I think 11.1 and 11.2 cap-bits). Dunno about feature levels 10.x and 9.3, when DX12 will come out, most of PC cards will be at least feature level 11 compliant, but most of mobile SoC will still be feature level 9.1 or 9.3 (Qualcomm SoCs with feature level 11 support are on the way), so probably it will be only a decision of IHVs.

"Recursion is the first step towards madness." - "Skegg?ld, Skálm?ld, Skildir ro Klofnir!"
Direct3D 12 quick reference: https://github.com/alessiot89/D3D12QuickRef/

This topic is closed to new replies.

Advertisement