Driver crash using GL_NV_shader_buffer_store

Hi!

I’m experiencing a lot of driver crashes when using GL_NV_shader_buffer_store extension. I’ve narrowed the problem down to getting some shader invocations in which an erroneous data is read from a buffer previously written to and an attempt to write to this same buffer is made. This happens despite glMemoryBarrierNV in between the passes. I’m using driver 258.96 with gtx460. Here is my scenario in pseudocode:

glDrawArrays
fragment shader writes data X via pointer A
every pixel discarded
glMemoryBarrierNV
glDrawArrays
fragment shader reads data X via pointer A
[data X is discovered to be trash]
fragment shader writes anything at any location via pointer A
every pixel discarded
glSwapBuffers <- driver crash

I’ve figured out the crash only occurs if the write is attempted in the same invocation of the shader in which the data is erroneous. I found that out by filtering the invocations by checking for the erroneous values of that data and doing {discard; return;} early, after which the program works completely fine. This also means those invocations must be irrelevant anyway, because the final result does not depend on them and is correct regardless of them being filtered out.

I’ve read that OpenGL might occasionally create “helper/auxiliary” invocations of a shader, so I understand those might be the ones in which trash data appears. What’s really a problem, though, is the fact that the driver crashes if a write is attempted in those invocations.

By the way, another strange fact is that even though this version of the driver supports both GL_EXT_shader_image_load_store and GL_NV_shader_buffer_load, the GL_NV_shader_buffer_store extension does not appear in glGetString (GL_EXTENSIONS). Nonetheless, everything works fine for me including writing, as long as I filter out the erroneous invocations as described.

I hope there is someone who can shed some light on what is really going on.

Thanks,
Ivan

EDIT: Forgot to include the graphic card model.

It sounds like you’ve already done a lot of careful culling of your algorithm to nail down the issue. How about posting a short GLUT test prog so folks can help you nail down the problem (template here). NVidia’s going to want this anyway to reproduce the problem if you end up filing a bug report.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.