Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


dx12 - dynamically indexable resources -what exactly it means?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 Icebone1000   Members   -  Reputation: 1126

Like
0Likes
Like

Posted 14 August 2014 - 02:07 PM

"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?


Edited by Icebone1000, 14 August 2014 - 02:08 PM.


Sponsor:

#2 MJP   Moderators   -  Reputation: 11624

Like
3Likes
Like

Posted 14 August 2014 - 02:49 PM

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.



#3 Icebone1000   Members   -  Reputation: 1126

Like
0Likes
Like

Posted 14 August 2014 - 03:33 PM

Thats awesome.



#4 Zaoshi Kaba   Crossbones+   -  Reputation: 4448

Like
0Likes
Like

Posted 14 August 2014 - 11:38 PM

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)?



#5 Hodgman   Moderators   -  Reputation: 31224

Like
4Likes
Like

Posted 15 August 2014 - 01:17 AM

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


Edited by Hodgman, 15 August 2014 - 01:19 AM.


#6 Icebone1000   Members   -  Reputation: 1126

Like
0Likes
Like

Posted 15 August 2014 - 11:18 AM

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?



#7 Alessio1989   Members   -  Reputation: 2069

Like
2Likes
Like

Posted 15 August 2014 - 01:39 PM

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.


Edited by Alessio1989, 15 August 2014 - 01:43 PM.

"Software does not run in a magical fairy aether powered by the fevered dreams of CS PhDs"





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS