YADB (Yet Another Driver Bug ?)

Description… VBO reused index
Driver… any NV driver

I have made a small test app that creates VBOs for shadow volumes when a light is stopped and they are not updated for a while to get higher performance. When the light moves again the VBOs are dropped. To get a distributed load on the driver over a number of frames I recylce the VBO ids in batches.

The small test app allocates 10 index and then drops all these in a batch. This works fine with non indexed geometry but when I use indexed geometry, the app bails out on the second draw call. I guess it triggers the first one…

First i get id 1…10 for vbo id by glGenBuffers

The draw calls uses then 1,3,5 etc for GL_ELEMENT_ARRAY_BUFFER and 2,4,6… for GL_ARRAY_BUFFER

Then after 10 allocations i drop all the used VBOs id with a glDeleteBuffers and this works ok

Then i allocate just like before and get id 1 for GL_ELEMENT_ARRAY_BUFFER and id 2 for GL_ARRAY_BUFFER

The first draw call is ok but the app crashes in DrvCopyContext in the second draw call using these “reallocated” id when i use indexed geometry. Non index version works fine. All indexes are fine, sizes of buffers ok.

I use glDrawRangeElements(GZ_TRIANGLE_STRIP… for the draw call.

Any hints ?? My mistake ?? Driver ??

Test files…

You can find test at http://www.gizmosdk.com/download/demos/win32/nvbugg.zip

Run the runme.bat and press ‘l’ (small L) to get the light stop movin. After approx 5 presses, the 10 VBO ids are recylced and the app allocates id 1 and 2 again. So go ahead and press ‘l’ a number of times…

No help, but I didn’t get any crashes on ATI/Intel. Crash on Geforce 6800. Are you 100% sure the index buffer memory is valid? Have you done appropiate locks/unlocks on the buffer? Any existing locks or accesses on the bufferes that were deleted?

Ran fine on ATI radeon 9700… Crash on geforceFX 5900XT. Double check nvidia docs before reporting a bug, might be some obscure detail in the implementation that’s not allowed on nv hw… gl :slight_smile:

I’ll run your test on nVidia FX 3000 hardware if you want. You’ll have to post the source code though, I don’t run binaries on my systems from untrusted sources.