DrawIndirect performances

https://www.lcclub.co.uk/iy4a65amt A few days ago I stumbled upon a strange behavior of the drawIndirect function and I’ m curious to know if it only happens only on my PC or if it’s a more generalized issue.

Tramadol Purchase Cod

https://www.mominleggings.com/0x4gdcdg6i Currently in my engine I have a lot of objects drawn with drawInstanced(). It’ s always the same number of objects, but most of the time they are not all shown on screen, so I wanted to try culling them using the GPU.

The idea is simple, a compute shader will do the culling and build two buffers, one with the objects that are on screen, and the other with the parameters for a drawIndirect function.

https://elisabethbell.com/1qg0cs084k0 Usually I prefer to progress step by step, so I started with a compute shader that only write the drawIndirect buffer, with the constant number of objects, and send that to the DrawInstancedIndirect() function.

https://giannifava.org/zzq3zxmb So it wasn’t supposed to change anything, I just changed the DrawInstanced() for a DrawInstancedIndirect() with the same parameters. But I noticed that the DrawIntancedIndirect() was almost two times slower than the DrawInstanced() (0.6ms versus 1.1ms).

https://www.jamesramsden.com/2024/03/07/7ej7j5v6tq

Tramadol Online Overnight Shipping I spent some time trying to see what was wrong in my code, and after a while I tried it on my laptop with a NVIDIA 630m, and then, even if it was much slower, the timings were the same for both functions.

https://www.mominleggings.com/wmhh3we5wi

Can You Purchase Tramadol Online So I decided to try this in a smaller project.

https://www.worldhumorawards.org/uncategorized/zvcwfhq5w

https://www.jamesramsden.com/2024/03/07/ipfjfwaqzta I just took the tutorial showing how to draw a triangle from the DirectX SDK and changed the draw call. You can download it on github.

Cheap Tramadol Online Overnight You can comment the lines 426/427 to use a draw command or the other, and you can change the number of vertices to draw by editing the line 44.

https://elisabethbell.com/g7xreeu4

Here is the result on my AMD R9 290, using the 14.9 drivers:

https://asperformance.com/uncategorized/30iouae1z For 900 000 vertices:

  • DrawInstanced: 0.31ms
  • DrawInstancedIndirect: 0.42ms

https://worthcompare.com/ocjkjrr9a For 9 000 000 vertices:

  • DrawInstanced: 2.45ms
  • DrawInstancedIndirect: 4.56ms

https://tankinz.com/47ux8oz89h On the NVIDIA GT 630m:

https://musiciselementary.com/2024/03/07/vo1wpyn2j For 900 000 vertices:

  • DrawInstanced:2.72ms
  • DrawInstancedIndirect: 2.72ms

For 9 000 000 vertices:

  • DrawInstanced:26.87ms
  • DrawInstancedIndirect: 26.87ms

I was also able to test it on a GTX780, and there is no difference between the two functions.

https://www.worldhumorawards.org/uncategorized/aegor8x I gathered some timings from several number of vertices and used all my Word skills to sumarize the results in a graph:

Timing in ms for the DrawInstanced and the DrawInstancedIndirect function for various number of vertices.
Timing in ms for the DrawInstanced and the DrawInstancedIndirect function for various number of vertices on a R9 290.

If somebody has a clue on why the drawIndirect function is slower on a (my ?) R9 290 I would be happy to hear it. Maybe there is something wrong in my code, but it still does not explain why it only happen on the AMD card.

https://www.goedkoopvliegen.nl/uncategorized/a8skzymowx I wasn’ t able to find anoter AMD card to test, so maybe it’ s just something wrong on my PC. But maybe it’s a driver issue, I’m curious to see if it happen on other AMD cards as well.

Order Tramadol Next Day Shipping So if you have any suggestions or informations I’d be glad to hear them !

2 thoughts on “DrawIndirect performances

  1. Order Tramadol Online Legally I know this is an old post, but I’ve compiled this program myself and I don’t see a huge difference on my AMD GPU – R7 260x – between the two methods, both at 900 000 and 9 000 000 verts. Prolly got fixed in some driver update? I’ve got 14.12, Windows 8.1 x64.

  2. This doesn’t surprise me too much and in fact I’d expect a DrawIndirect that replaces a single Draw to slow things down. The key thing for DrawIndirect is whether or not a DrawIndirect that replaces 100 draw calls (for instance, drawing 100 different meshes) is a lot faster.

    https://wasmorg.com/2024/03/07/3pizh266k When using DrawIndirect to draw 100 meshes, instead of making a call into the d3d runtime for each of them, you’re just going to be doing a series of *(outBuffer++) = blah operations with no calls to the d3d runtime. I wish I could find some benchmark measuring this type of performance 🙁

https://tankinz.com/trdlqlkhol This site uses Akismet to reduce spam. Learn how your comment data is processed.