llvmpipe: Unimplemented get_driver_uuid/get_device_uuid causes segfaults in e.g. Wine
System information
- OS: openSUSE Tumbleweed
- GPU: llvmpipe (LLVM 13.0.0, 256 bits)
- Kernel version: 5.15.12-1-default
- Mesa version: 21.3.3 + main
Describe the issue
Running wine with llvmpipe (LIBGL_ALWAYS_SOFTWARE=1 wine ...
) causes Wine to segfault.
In Wine, this can be worked around by MESA_EXTENSION_OVERRIDE="-GL_EXT_memory_object"
, as it avoids the call to glGetUnsignedBytevEXT(GL_DRIVER_UUID_EXT, dr_uuid)
/glGetUnsignedBytei_vEXT(GL_DEVICE_UUID_EXT, 0, dev_uuid)
.
Regression
Caused by !12345 (diffs)
Trivial reproducer:
#define GL_GLEXT_PROTOTYPES 1
#include <SDL2/SDL.h>
#include <SDL2/SDL_video.h>
#include <GL/gl.h>
#include <GL/glext.h>
#include <stdio.h>
int main(int argc, char* argv[])
{
GLint count = 0;
GLubyte driver_uuid[16];
GLubyte device_uuid[16];
SDL_Window *window = SDL_CreateWindow(
"SDL2/OpenGL Demo", 0, 0, 640, 480,
SDL_WINDOW_OPENGL|SDL_WINDOW_RESIZABLE);
SDL_GLContext glcontext = SDL_GL_CreateContext(window);
glGetIntegerv(GL_NUM_DEVICE_UUIDS_EXT, &count);
if (count) {
glGetUnsignedBytevEXT(GL_DRIVER_UUID_EXT, driver_uuid);
glGetUnsignedBytei_vEXT(GL_DEVICE_UUID_EXT, 0, device_uuid);
}
}
Compile with g++ -o ./test_gl_ext_memory_obj ./test_gl_ext_memory_obj.c -lGL -lSDL2
Edited by StefanBruens