diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-15 01:05:24 +0100 |
---|---|---|
committer | Owain G. Ainsworth <oga@openbsd.org> | 2010-05-17 20:40:47 +0100 |
commit | 04b811fa4a3938347a696d8c8d05c9b3462ae919 (patch) | |
tree | b27a9e1d161d699cd5538b49140e1d4b1d6b53eb /src/i830_uxa.c | |
parent | 295726e0ff75744d70e95128f5a6d386962ef1f2 (diff) |
i830: Remove xrgb conversion to argb, no longer required.
All textures are now properly declared so that the alpha swizzling
occurs in the sampler or not at all. The downside is that for quite a
few composite operations we have to fallback to software on older
hardware. There is scope for more performing the alpha expansion in
shaders or combiners when we know the picture covers the clip - which is
almost all of the time for normal operations especially those
constructed by Cairo.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
(cherry picked from commit 9c3da71349bcfeabae08f1572cf602c357bf7641)
Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
Diffstat (limited to 'src/i830_uxa.c')
-rw-r--r-- | src/i830_uxa.c | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/src/i830_uxa.c b/src/i830_uxa.c index 5e8cc116..fccfa55c 100644 --- a/src/i830_uxa.c +++ b/src/i830_uxa.c @@ -678,35 +678,7 @@ static Bool i830_bo_put_image(PixmapPtr pixmap, dri_bo *bo, char *src, int src_p { int stride = i830_pixmap_pitch(pixmap); - /* fill alpha channel */ - if (pixmap->drawable.depth == 24) { - pixman_image_t *src_image, *dst_image; - - src_image = pixman_image_create_bits (PIXMAN_x8r8g8b8, - w, h, - (uint32_t *) src, src_pitch); - - dst_image = pixman_image_create_bits (PIXMAN_a8r8g8b8, - w, h, - (uint32_t *) bo->virtual, stride); - - if (src_image && dst_image) - pixman_image_composite (PictOpSrc, - src_image, NULL, dst_image, - 0, 0, - 0, 0, - 0, 0, - w, h); - - if (src_image) - pixman_image_unref (src_image); - - if (dst_image) - pixman_image_unref (dst_image); - - if (src_image == NULL || dst_image == NULL) - return FALSE; - } else if (src_pitch == stride) { + if (src_pitch == stride) { memcpy (bo->virtual, src, stride * h); } else { char *dst = bo->virtual; @@ -800,8 +772,7 @@ static Bool i830_uxa_put_image(PixmapPtr pixmap, priv = i830_get_pixmap_intel(pixmap); if (priv->batch_read_domains || - drm_intel_bo_busy(priv->bo) || - pixmap->drawable.depth == 24) { + drm_intel_bo_busy(priv->bo)) { dri_bo *bo; /* Partial replacement, copy incoming image to a bo and blit. */ |