diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-10-04 11:56:27 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-10-04 20:24:36 +0100 |
commit | 7c7294ec00d6c3a454a17a1b9983d14d0655162c (patch) | |
tree | a3531e854d0310ae6fd750628e58fcadc6ea7995 /uxa | |
parent | 16a5d0ee3ca4d41af6a6876a8baf81e3f715781d (diff) |
shadow+dri2: Allow dri2 to be independently enabled with shadow
To enable DRI we create GEM buffers for the client to render into with
hardware acceleration. In order to maintain coherency between any 2D
render operations with the independent 3D clients (this includes the
reading of 2D rasterisation by the direct rendering client, e.g.
compiz using texture_from_pixmap) we need to replace the shadow pixmap
with the GTT mapping. Therefore 2D rendering to a DRI buffer will be to
uncached memory and thus penalised -- but the direct rendering clients
will have full hardware acceleration.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'uxa')
-rw-r--r-- | uxa/uxa-glyphs.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/uxa/uxa-glyphs.c b/uxa/uxa-glyphs.c index ad4f3877..420e8915 100644 --- a/uxa/uxa-glyphs.c +++ b/uxa/uxa-glyphs.c @@ -164,7 +164,12 @@ static Bool uxa_realize_glyph_caches(ScreenPtr pScreen) INTEL_CREATE_PIXMAP_TILING_X); if (!pixmap) goto bail; - assert (uxa_pixmap_is_offscreen(pixmap)); + if (!uxa_pixmap_is_offscreen(pixmap)) { + /* Presume shadow is in-effect */ + pScreen->DestroyPixmap(pixmap); + uxa_unrealize_glyph_caches(pScreen); + return TRUE; + } component_alpha = NeedsComponent(pPictFormat->format); picture = CreatePicture(0, &pixmap->drawable, pPictFormat, |