xf86-video-ati: Branch 'master' - 2 commits
Alex Deucher
agd5f at kemper.freedesktop.org
Thu Nov 5 07:42:35 PST 2009
src/r600_exa.c | 7 ++++++-
src/radeon_exa_funcs.c | 17 ++++++++++++-----
src/radeon_exa_render.c | 21 ++++++++++++++++++---
3 files changed, 36 insertions(+), 9 deletions(-)
New commits:
commit b6ac42cce2156880ac18b32e15acbff40b2f53e9
Author: Tomáš Chvátal <scarabeus at gentoo.org>
Date: Sat Oct 31 23:07:07 2009 +0100
Fix warning about unused defined labels in radeon_exa_funcs.c.
Signed-off-by: Tomáš Chvátal <scarabeus at gentoo.org>
diff --git a/src/radeon_exa_funcs.c b/src/radeon_exa_funcs.c
index d5a3103..1f463d1 100644
--- a/src/radeon_exa_funcs.c
+++ b/src/radeon_exa_funcs.c
@@ -454,16 +454,18 @@ RADEONUploadToScreenCS(PixmapPtr pDst, int x, int y, int w, int h,
RINFO_FROM_SCREEN(pScreen);
struct radeon_exa_pixmap_priv *driver_priv;
struct radeon_bo *scratch;
- unsigned char *dst;
unsigned size;
- uint32_t datatype = 0;
uint32_t dst_domain;
- uint32_t dst_pitch_offset;
unsigned bpp = pDst->drawable.bitsPerPixel;
uint32_t scratch_pitch = (w * bpp / 8 + 63) & ~63;
- uint32_t swap = RADEON_HOST_DATA_SWAP_NONE;
Bool r;
+#if X_BYTE_ORDER == X_BIG_ENDIAN
+ unsigned char *dst;
+ uint32_t datatype = 0;
+ uint32_t dst_pitch_offset;
+ uint32_t swap = RADEON_HOST_DATA_SWAP_NONE;
int i;
+#endif
if (bpp < 8)
return FALSE;
@@ -512,6 +514,7 @@ RADEONUploadToScreenCS(PixmapPtr pDst, int x, int y, int w, int h,
goto out;
}
+#if X_BYTE_ORDER == X_BIG_ENDIAN
copy:
r = radeon_bo_map(scratch, 0);
if (r) {
@@ -538,7 +541,7 @@ copy:
dst_pitch_offset, 0, 0, x, y, w, h,
RADEON_GEM_DOMAIN_GTT, RADEON_GEM_DOMAIN_VRAM);
}
-
+#endif
out:
if (scratch != driver_priv->bo)
radeon_bo_unref(scratch);
@@ -558,7 +561,9 @@ RADEONDownloadFromScreenCS(PixmapPtr pSrc, int x, int y, int w,
uint32_t src_pitch_offset;
unsigned bpp = pSrc->drawable.bitsPerPixel;
uint32_t scratch_pitch = (w * bpp / 8 + 63) & ~63;
+#if X_BYTE_ORDER == X_BIG_ENDIAN
uint32_t swap = RADEON_HOST_DATA_SWAP_NONE;
+#endif
Bool r;
if (bpp < 8)
@@ -628,6 +633,7 @@ RADEONDownloadFromScreenCS(PixmapPtr pSrc, int x, int y, int w,
RADEON_GEM_DOMAIN_GTT);
FLUSH_RING();
+#if X_BYTE_ORDER == X_BIG_ENDIAN
copy:
r = radeon_bo_map(scratch, 0);
if (r) {
@@ -646,6 +652,7 @@ copy:
dst += dst_pitch;
}
radeon_bo_unmap(scratch);
+#endif
out:
if (scratch != driver_priv->bo)
radeon_bo_unref(scratch);
commit 87d7235790866f9c19ef08972d5237f09d940cd9
Author: Alex Deucher <alexdeucher at gmail.com>
Date: Thu Nov 5 10:23:03 2009 -0500
EXA: fallback if no pMaskPicture->pDrawable
A solid or gradient mask could be used for blending
the source picture onto the destination picture.
Fixes fdo bug 24838
Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
diff --git a/src/r600_exa.c b/src/r600_exa.c
index a2ce5c9..7d8cf46 100644
--- a/src/r600_exa.c
+++ b/src/r600_exa.c
@@ -1603,7 +1603,12 @@ static Bool R600CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP
}
if (pMaskPicture) {
- PixmapPtr pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
+ PixmapPtr pMaskPixmap;
+
+ if (!pMaskPicture->pDrawable)
+ RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
+
+ pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
if (pMaskPixmap->drawable.width >= max_tex_w ||
pMaskPixmap->drawable.height >= max_tex_h) {
diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
index 7ae0d1f..b745705 100644
--- a/src/radeon_exa_render.c
+++ b/src/radeon_exa_render.c
@@ -524,7 +524,12 @@ static Bool R100CheckComposite(int op, PicturePtr pSrcPicture,
}
if (pMaskPicture) {
- PixmapPtr pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
+ PixmapPtr pMaskPixmap;
+
+ if (!pMaskPicture->pDrawable)
+ RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
+
+ pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
if (pMaskPixmap->drawable.width > 2047 ||
pMaskPixmap->drawable.height > 2047) {
@@ -900,7 +905,12 @@ static Bool R200CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP
}
if (pMaskPicture) {
- PixmapPtr pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
+ PixmapPtr pMaskPixmap;
+
+ if (!pMaskPicture->pDrawable)
+ RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
+
+ pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
if (pMaskPixmap->drawable.width > 2047 ||
pMaskPixmap->drawable.height > 2047) {
@@ -1359,7 +1369,12 @@ static Bool R300CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP
}
if (pMaskPicture) {
- PixmapPtr pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
+ PixmapPtr pMaskPixmap;
+
+ if (!pMaskPicture->pDrawable)
+ RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
+
+ pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
if (pMaskPixmap->drawable.width > max_tex_w ||
pMaskPixmap->drawable.height > max_tex_h) {
More information about the xorg-commit
mailing list