cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

AveryYang
Journeyman III

DrawIndexed and DrawInstanced problem

Hi all,

I'm using DirectX 10 to render a model 10 times.

I use two methods to implement it:

i. Just call DrawIndexed() 10 times

ii. Using DrawInstanced()

But I get the problem: the latter method's fps is lower than the former(fig 1).

My program result.

I use the GPU PerfStudio 2 to measure the performance, too.

But the GPUTime shows every draw call have the same time(fig 2).

GPU PerfStudio 2 result

Does anyone have ideas?

Thanks for reading patiently.

Sincerely,

Avery

0 Likes
2 Replies
nuclear_bro
Adept I

Have you tested it on much (x100, x1000 times) more complicated scenes? Ten objects is very simple task for GPU and is definately not a benchmark for it. Try to lower overall rate to 200 fps or less and see.

0 Likes

Thanks for reply.

I tested it on 500 the same models,

and the results were not change.

DrawIndexed x500 times got 440 fps, and DrawInstanced got 134 fps.

PS.

Sorry, I forgot to mention that: the model used in the DrawInstanced method is extracted from a texture in geometry shader(GS). Is this the bottleneck? How can I get the time cost of Texture.SampleLevel()?

0 Likes