Commit Graph

5 Commits

Author SHA1 Message Date
Eric Anholt 707726b155 glamor: Do the same MakeCurrent(None) for GLX as we do for EGL.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-04-23 10:32:32 -07:00
Eric Anholt fab0a4a4c9 glamor: Replace glamor_get/put_context() with just glamor_make_current().
Now that we have the DIX global state for the current context, we
don't need to track nesting to try to reduce MakeCurrent overhead.

v2: Fix a mistaken replacement of a put_context with make_current in
    glamor_fill_spans_gl() (caught by keithp).

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> (v1)
Reviewed-by: Adam Jackson <ajax@redhat.com> (v1)
2014-04-23 10:32:23 -07:00
Eric Anholt b5e394b3f5 glamor: Use lastGLContext to coordinate the context with GLX.
This gets us some more context changes that are needed to make sure
the two sides render to the right drawables and manipulate the right
objects.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-04-23 10:32:18 -07:00
Eric Anholt a895f6a165 glamor: Drop the set of the context to NULL at the end of glamor ops.
The theory here was that it (which I copied from EGL) existed to fix
up context switching with indirect GLX.  But indirect GLX won't even
try to set the context again unless its lastContext field is cleared,
so we need to solve this a different way.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-03-17 14:30:41 -07:00
Eric Anholt 4afe15d8bf glamor: Put in a pluggable context switcher for GLX versus EGL.
The GLX side just gets the context from the current state.  That's
also something I want to do for EGL, so that the making a context is
separate from initializing glamor, but I think I need the modesetting
driver in the server before I think about hacking on that more.

The previous code was rather incestuous, along with pulling in xf86
dependencies to our dix code.  The new code just initializes itself
from the current state.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-02-14 18:30:01 -08:00