glGetBufferSubData crashes if you attempt to read large enough chunk of the buffer at once (e.g. 20MB).
if you instead read it in smaller chunks it works.
I attached a simple win32-based source that demonstrates the bug
Can you try to change a code:
int err = glGetError(); // ?
_glBufferData(GL_COPY_WRITE_BUFFER, size, data, GL_STATIC_DRAW);
err = glGetError(); // ?
_glGetBufferSubData(GL_COPY_WRITE_BUFFER, 0, size, data);
may be have error "GL_OUT_OF_MEMORY" or "GL_INVALID_OPERATION"
there is no GL error. the buffer actually works - it is a vertex buffer and I draw from it (this is not in the attached code but in my real code, the attached code is simplified example just to demonstrate the bug).
Just glGetBufferSubData crashes, nothing else is wrong.
moreover even if there was GL error, the driver still shouldn't crash, so it still would be a bug.
On ATI HD 5770 it works fine, without a crash
Sorry, i forgot to give details about my machine - it's 32-bit XP (this is probably very important since XP and w7 use different driver architectures), catalyst 11.12, HD 57?? (i guess 5770, the driver only tells "5700 series")
the exact hardware probably doesn't matter since a crash in the driver is a software affair
This could be a failure to allocate some memory deep in the driver. We'll run your application and debug into it to see where it's failing. I'll keep you posted on this thread.
This does not appear to happen with newer drivers
Retrieving data ...