Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Slow performance of rendering quads in D3D if using big vertex buffer


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
No replies to this topic

#1 pkirill   Members   -  Reputation: 100

Like
0Likes
Like

Posted 16 February 2012 - 01:47 PM

Hi Team,
I have an performance issue with 5770 ATI card with the latest drivers and with windows7 32 bits:
The program does the following :
It has a VertexBuffer, which is dynamic : D3DUSAGE_DYNAMIC|D3DUSAGE_WRITEONLY, D3DPOOL_DEFAULT
Assume I need to render 50K quads. Assume the buffer capacity is N quads.
How do I render :
SetTexture(0, t);
for (1..50k/N) {
LockEntireBuffer(D3DLOCK_DISCARD);
Fill The Buffer With Quads Data
Unlock();
DrawIndexedPrimitive();
}
The problem is following:
When the vertex buffer is really small ( <4kbyte) (42 quads * 24 bytes per vertex) then rendering is very fast (lets say 64 fps, no-v-sync);
When the buffer 2x times more then 4k the rendering become very slow : 43 fps,
When buffer grows to 96k (1024 quads) then fps slowly grows up to 57 FPS.
Our profiling tells that when sizeof the buffer exceeded 4k, the program starts spending too much time in D3DKMTLock.
The problem is not reproducible when we change textures frequently :
for (..) {
LockEntireBuffer(D3DLOCK_DISCARD);
Fill The Buffer With Quads Data
Unlock();
for (...) {
SetTexture(t[i]);
DrawIndexedPrimitive(part of the buffer);
}
}
In that situation : the bigger buffer is, the faster it renders.
What am I doing wrong ? Why do we have very significant boos with dynamic buffers less then 4k ?
Thanks

Sponsor:



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