diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-15 01:05:24 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-15 01:09:26 +0100 |
commit | 9c3da71349bcfeabae08f1572cf602c357bf7641 (patch) | |
tree | da07ae45157a1ef846b6db215c7889dd41346b57 | |
parent | 926fbc7d90ac1d0d49d154f136f9c9ed613c98c2 (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>
-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 b2370fe7..d4028959 100644 --- a/src/i830_uxa.c +++ b/src/i830_uxa.c @@ -681,35 +681,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; @@ -803,8 +775,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. */ |