loader_dri3/glx/egl: Reinstate the loader_dri3_vtable get_dri_screen callback
Removing this callback caused rendering corruption in some multi-screen cases,
so it is reinstated but without the drawable argument which was never used
by implementations and was confusing since the drawable could have been
created with another screen.
Cc: "17.3 18.0" mesa-stable@lists.freedesktop.org
Fixes: 5198e48a0d
(loader_dri3/glx/egl: Remove the loader_dri3_vtable get_dri_screen callback)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105013
Reported-by: Daniel van Vugt <daniel.van.vugt@canonical.com>
Tested-by: Timo Aaltonen <tjaalton@ubuntu.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
@@ -116,6 +116,16 @@ glx_dri3_get_dri_context(struct loader_dri3_drawable *draw)
|
||||
return (gc != &dummyContext) ? dri3Ctx->driContext : NULL;
|
||||
}
|
||||
|
||||
static __DRIscreen *
|
||||
glx_dri3_get_dri_screen(void)
|
||||
{
|
||||
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)
|
||||
{
|
||||
@@ -150,6 +160,7 @@ static const 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,
|
||||
};
|
||||
|
Reference in New Issue
Block a user