cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

lukcho
Journeyman III

glGetBufferSubData crashes with big buffers

Hello

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

0 Likes
6 Replies

Can you try to change a code:

_glBindBuffer(GL_COPY_WRITE_BUFFER, buf);

int err = glGetError();  // ?

  _glBufferData(GL_COPY_WRITE_BUFFER, size, data, GL_STATIC_DRAW);

err = glGetError();  // ?

  _glGetBufferSubData(GL_COPY_WRITE_BUFFER, 0, size, data);

err = glGetError();  // ?

may be have error "GL_OUT_OF_MEMORY" or "GL_INVALID_OPERATION"

0 Likes

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.

0 Likes

On ATI HD 5770 it works fine, without a crash

0 Likes

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

0 Likes
gsellers
Staff

Hi,

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.

Cheers,

Graham

0 Likes

This does not appear to happen with newer drivers

0 Likes