Quick DrawIndexed/DrawIndexedInstanced question

Started by
4 comments, last by SoldierOfLight 6 years, 7 months ago

Just a really quick question - is there any overhead to using DrawIndexedInstanced even for geometry you just render once vs using DrawIndexed? Or is the details obfuscated by the graphics driver?

I would assume no but you never know :) 

Advertisement

I would assume its only minor.  With instanced you need to load another buffer into the GPU to be referenced.   BUT, for single draw you need to reference a constant buffer with the related Matrix in it for transformation.

DrawInstanced although a little more work would be the best way forward, especially as you could pack all your instance matrices into 1 buffer for all your different models, and just reference an offset.

 

Indie game developer - Game WIP

Strafe (Working Title) - Currently in need of another developer and modeler/graphic artist (professional & amateur's artists welcome)

Insane Software Facebook

FWIW in D3D12 they got rid of the non-instanced functions and now only have DrawIndexedInstanced / DrawInstanced :o

Just now, Hodgman said:

FWIW in D3D12 they got rid of the non-instanced functions and now only have DrawIndexedInstanced / DrawInstanced

I would assume because non instanced just doesn't offer up much more, did they optimise DX 12 for instanced versions?

Indie game developer - Game WIP

Strafe (Working Title) - Currently in need of another developer and modeler/graphic artist (professional & amateur's artists welcome)

Insane Software Facebook

DrawIndexed = DrawIndexedInstanced with instance count set to 1.

This topic is closed to new replies.

Advertisement