From db5337afb248edf81087cf8d74006fc496d70589 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 15 Jul 2015 17:56:11 +1000 Subject: glamor: make current in prepare paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lots of the accel paths only make current once they start doing someting, so a lot of them call the bail paths without make current, which means on PRIME systems for example we end up in the wrong context. Add a prepare pixmap in the prepare fallback path. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90667 Signed-off-by: Dave Airlie Signed-off-by: Eric Anholt Reviewed-and-Tested-by: Michel Dänzer Reviewed-by: Eric Anholt --- glamor/glamor_prepare.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/glamor/glamor_prepare.c b/glamor/glamor_prepare.c index 833291c58..5a73e6c7d 100644 --- a/glamor/glamor_prepare.c +++ b/glamor/glamor_prepare.c @@ -45,6 +45,8 @@ glamor_prep_pixmap_box(PixmapPtr pixmap, glamor_access_t access, BoxPtr box) if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(priv)) return TRUE; + glamor_make_current(glamor_priv); + RegionInit(®ion, box, 1); /* See if it's already mapped */ -- cgit v1.2.3