This happens when running d3d application in recent wine with MESA_EXTENSION_OVERRIDE="-GL_ARB_map_buffer_range"
Could you please attach an apitrace file? Apitrace can record and replay OpenGL commands. You can get it here: https://github.com/apitrace/apitrace
Can't. The trace file is 6.7M gzipped and the attachment limit is 3000k. It is trace from the start of the application to the point where it finishes initialization, tries to render the first scene and triggers the assert. glretrace complains that the last call is incomplete whatever that means: warning: incomplete call glDrawElementsBaseVertex 27826 glDrawElementsBaseVertex(mode = GL_TRIANGLE_STRIP, count = 110, type = GL_UNSIGNED_SHORT, indices = blob(220), basevertex = 54) Tried taking glretrace snapshots with -s. They are all small black squares. With -sb and -s I get errors about GL_BACK being invalid but every other snapshot contains the application loading screen (upside down).
I couldn't reproduce this with the Wine D3D9 tests. Can you attach the full backtrace of the crash? Knowing the values of local variables and upload->buffer->width0 would be useful too. Alternatively, you can update your apitrace and give it a try again.
I think that the reason apitrace does not finish the trace properly is that Mesa aborts and apitrace runs in the aborted process so there is not much that can be done. I can't really debug wine because it is i386, not amd64. I could perhaps try building more recent mesa to see if the issue is gone yet.
You may set: export GALLIUM_ABORT_ON_ASSERT=0 to disable abort() on assertions.
Hmm, current apitrace can't trace the program, it segfaults. Also retracing a trace which would lead to the assertion causes glretrace segfault. This is somewhat different from what I got previously but not exactly helpful except perhaps as a sample trace showing apitrace problems.
According to apitrace author the glretrace crash is due to gallium reading more data than is in the buffer. https://github.com/apitrace/apitrace/issues/39#issuecomment-2134199
Created attachment 51371 [details] [review] print debug info I think it crashes because offset >= upload->buffer->width0. Could you apply the attached patch and post the output of stderr?
I get this extra output: u_vbuf_upload_buffers u_vbuf_upload_buffers u_vbuf_upload_buffers u_vbuf_upload_buffers u_vbuf_upload_buffers u_vbuf_upload_buffers u_vbuf_upload_buffers u_upload_alloc:194: min_out_offset = 4294966000, size = 1296, alloc_size = 1296, alloc_offset = 4294966000, upload->offset = 322528, upload->size = 1048576, upload->buffer->width0 = 1048576, offset = 4294966000 util/u_upload_mgr.c:195:u_upload_alloc: Assertion `offset < upload->buffer->width0' failed.
Created attachment 51377 [details] backtrace of glretrace backtrace of glretrace on older unpatched mesa
Can you send me the trace file that glretrace crashes with?
The trace helped me to identify and fix the bug. Mesa master should work now. Could you test it?
Yes, with mesa master the crash no longer happens. Thanks
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.