diff options
Diffstat (limited to 'src/glx')
-rw-r--r-- | src/glx/dri3_glx.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c index 90d7bba1e69..51b6b1cdfa6 100644 --- a/src/glx/dri3_glx.c +++ b/src/glx/dri3_glx.c @@ -132,6 +132,16 @@ glx_dri3_get_dri_context(struct loader_dri3_drawable *draw) return (gc != &dummyContext) ? dri3Ctx->driContext : NULL; } +static __DRIscreen * +glx_dri3_get_dri_screen(struct loader_dri3_drawable *draw) +{ + struct glx_context *gc = __glXGetCurrentContext(); + struct dri3_context *pcp = (struct dri3_context *) gc; + struct dri3_screen *psc = (struct dri3_screen *) pcp->base.psc; + + return (gc != &dummyContext && psc) ? psc->driScreen : NULL; +} + static void glx_dri3_flush_drawable(struct loader_dri3_drawable *draw, unsigned flags) { @@ -169,6 +179,7 @@ static struct loader_dri3_vtable glx_dri3_vtable = { .set_drawable_size = glx_dri3_set_drawable_size, .in_current_context = glx_dri3_in_current_context, .get_dri_context = glx_dri3_get_dri_context, + .get_dri_screen = glx_dri3_get_dri_screen, .flush_drawable = glx_dri3_flush_drawable, .show_fps = glx_dri3_show_fps, }; |