dri: add queryCompatibleRenderOnlyDeviceFd() to __DRI_MESA extension
With this change we are able to query the render node fd of a render-only device compatible with a given KMS-only device (at the egl/dri2 level). It uses pipe_loader_get_compatible_render_capable_device_fd(), which was added in commit "pipe-loader: add pipe_loader_get_compatible_render_capable_device_fd()". Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com> Reviewed-by: Simon Ser <contact@emersion.fr> Reviewed-by: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24825>
This commit is contained in:

committed by
Marge Bot

parent
2b6a421915
commit
4d953efc28
@@ -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 */
|
||||
|
@@ -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. */
|
||||
|
Reference in New Issue
Block a user