Friday, February 3, 2012

Of Buffers and Buffoonery

Seems that for the past year and a half I have been reading from a dynamic vertex buffer created with D3DUSAGE_WRITEONLY. Ouch.

What's amazing is that this actually worked. What's even more amazing is that it never seemed to impact performance overmuch. What's most amazing of all is that it never showed up in debug runtime or PIX analysis.

I finally managed to catch it when consolidating some code shared between MDLs and IQMs but that's something that should really have been red-flagged a long time ago. How about the very first time I did it way back in time? Sounds about right.

Ahh, the dangers of abstracting things to too high a level...

No comments: