Closed turol closed 8 years ago
The problem seems to be that the type
for GL_RED_INTEGER
's InternalFormatDesc
is GL_NONE
, which leads to the assert.
More precisely it seems that commit 8374a0d66ca9228269e860089c1535fcda9f9c5f changed the semantics of the if because before it would trigger if the format was not found and now it triggers on type == GL_NONE
.
This is a bug in NVIDIA driver.
2575 glBindTexture(target = GL_TEXTURE_BUFFER, texture = 17)
2576 glTexBuffer(target = GL_TEXTURE_BUFFER, internalformat = GL_R32UI, buffer = 7)
but querying GL_TEXTURE_BUFFER_FORMAT_ARB
or GL_TEXTURE_INTERNAL_FORMAT
returns GL_RED_INTEGER
, and not GL_R32UI
as it should.
Mesa OpenGL drivers works fine.
I'm afraid there's not much I can do. GL_RED_INTEGER
is untyped and does not explain how to interpret the texture buffer (it could be integer, float, 32 bits, 16 bits, etc.)
I'll replace the assertion with a warning, but you won't be able to see the contents of those buffers.
@ahuillet
@jrfonseca Not seeing the buffer contents is no big deal, I can always go look at the glBufferData command if I need to. The crashing however IS a big deal since I can't see any states in certain draw calls. Can you fix qapitrace so that it deals gracefully with crashing glretrace?
Thanks for fixing this.
Can you fix qapitrace so that it deals gracefully with crashing glretrace?
Fixing this particular crash is easy.
Fixing generic crashes is harder, but I agree worthwhile. I'll try but I can't guarantee ETA.
BTW, if you apitrace build in release (ie pass -DCMAKE_BUILD_TYPE=Release
) it won't assert and neither glretrace or qapitrace should crash.
I have filed NVIDIA bug 1733820 to track this issue. If you can provide a repro application, or an update to Piglit's tests/texturing/texture-rg.c to test integer formats, this would be helpful. Thanks
The problem in the NVIDIA driver was identified and fixed a while ago.
@ahuillet Thanks!
Using this trace:
https://www.dropbox.com/s/oj0qjzsdi7m0wl2/Overgrowth.bin.x86_64.trace.xz?dl=0
this command:
glretrace -D 8349 --dump-format ubjson Overgrowth.bin.x86_64.trace > /dev/null
crashes with
retrace/glstate_images.cpp:310: bool glstate::getActiveTextureLevelDesc(glstate::Context&, GLenum, GLint, glstate::ImageDesc&): Assertion '0' failed.
This in turn causes qapitrace to crash with:
I think this has something to do with texture buffer objects.