glx: add a glx_screen member to indicate GLX_EXT_texture_from_pixmap
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30524>
This commit is contained in:

committed by
Marge Bot

parent
7ab02fdff5
commit
02fdca7ffe
@@ -1001,6 +1001,8 @@ dri2CreateScreen(int screen, struct glx_display * priv, bool driver_name_is_infe
|
||||
psp->getSwapInterval = dri2GetSwapInterval;
|
||||
psp->maxSwapInterval = INT_MAX;
|
||||
|
||||
psc->base.can_EXT_texture_from_pixmap = true;
|
||||
|
||||
__glXEnableDirectExtension(&psc->base, "GLX_OML_sync_control");
|
||||
__glXEnableDirectExtension(&psc->base, "GLX_SGI_video_sync");
|
||||
|
||||
|
@@ -857,6 +857,12 @@ dri3_create_screen(int screen, struct glx_display * priv, bool driver_name_is_in
|
||||
psp->bindTexImage = dri3_bind_tex_image;
|
||||
psp->maxSwapInterval = INT_MAX;
|
||||
|
||||
/* when on a different gpu than the server, the server pixmaps
|
||||
* can have a tiling mode we can't read. Thus we can't create
|
||||
* a texture from them.
|
||||
*/
|
||||
psc->base.can_EXT_texture_from_pixmap = psc->fd_render_gpu == psc->fd_display_gpu;
|
||||
|
||||
__glXEnableDirectExtension(&psc->base, "GLX_OML_sync_control");
|
||||
__glXEnableDirectExtension(&psc->base, "GLX_SGI_video_sync");
|
||||
|
||||
|
@@ -931,6 +931,7 @@ driswCreateScreen(int screen, struct glx_display *priv, enum glx_driver glx_driv
|
||||
psp = &psc->vtable;
|
||||
psc->base.driScreen = psp;
|
||||
psc->base.frontend_screen = psc->driScreen;
|
||||
psc->base.can_EXT_texture_from_pixmap = true;
|
||||
psp->destroyScreen = driswDestroyScreen;
|
||||
psp->createDrawable = driswCreateDrawable;
|
||||
psp->swapBuffers = driswSwapBuffers;
|
||||
|
@@ -514,6 +514,7 @@ struct glx_screen
|
||||
bool force_direct_context;
|
||||
bool allow_invalid_glx_destroy_window;
|
||||
bool keep_native_window_glx_drawable;
|
||||
bool can_EXT_texture_from_pixmap;
|
||||
|
||||
char *driverName;
|
||||
|
||||
|
Reference in New Issue
Block a user