Optimisations...
Hello.
I am trying to speed up my program slightly and I have a question...
Which is faster, locking a vertex buffer, writing four vertices to it, and then unlocking it...
or changing the stream source?
Thanks in advance for any help.
Mark Coleman
That depends on the vertex buffer.
If you have one big vertex buffer that's streaming, and you lock a previously un-written area with NOOVERWRITE (and DISCARD at the end), the lock-write-unlock MIGHT have a chance of being faster. Locking any other kind of buffer is likely to stall the GPU in a way that simply setting the stream source won't.
If you have one big vertex buffer that's streaming, and you lock a previously un-written area with NOOVERWRITE (and DISCARD at the end), the lock-write-unlock MIGHT have a chance of being faster. Locking any other kind of buffer is likely to stall the GPU in a way that simply setting the stream source won't.
Changing your stream would probably be a little faster. But I don't think it's there you are losing your time in the application.
Try to use a timing tool to find where the really big losses occur. I think you will find that there are 2-3 really big time consuming functions.
Try to use a timing tool to find where the really big losses occur. I think you will find that there are 2-3 really big time consuming functions.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement