diff --git a/include/GL/internal/mesa_interface.h b/include/GL/internal/mesa_interface.h index f0a29503e46..a56509439e2 100644 --- a/include/GL/internal/mesa_interface.h +++ b/include/GL/internal/mesa_interface.h @@ -61,6 +61,8 @@ struct __DRImesaCoreExtensionRec { /* driver function for finishing initialization inside createNewScreen(). */ const __DRIconfig **(*initScreen)(struct dri_screen *screen); + + int (*queryCompatibleRenderOnlyDeviceFd)(int kms_only_fd); }; #endif /* MESA_INTERFACE_H */ diff --git a/src/gallium/frontends/dri/dri2.c b/src/gallium/frontends/dri/dri2.c index e37ff4d9a3f..a018ef70437 100644 --- a/src/gallium/frontends/dri/dri2.c +++ b/src/gallium/frontends/dri/dri2.c @@ -2477,12 +2477,19 @@ fail: return NULL; } +static int +dri_query_compatible_render_only_device_fd(int kms_only_fd) +{ + return pipe_loader_get_compatible_render_capable_device_fd(kms_only_fd); +} + static const struct __DRImesaCoreExtensionRec mesaCoreExtension = { .base = { __DRI_MESA, 1 }, .version_string = MESA_INTERFACE_VERSION_STRING, .createNewScreen = driCreateNewScreen2, .createContext = driCreateContextAttribs, .initScreen = dri2_init_screen, + .queryCompatibleRenderOnlyDeviceFd = dri_query_compatible_render_only_device_fd, }; /* This is the table of extensions that the loader will dlsym() for. */