[PATCH] radeon: fix exa texture setup v2

j.glisse at gmail.com j.glisse at gmail.com
Mon Nov 12 13:11:18 PST 2012


From: Jerome Glisse <jglisse at redhat.com>

exa state that we should use the pixmap to get the width, height and
pitch to use when setting up texture (see exa.h). This fix a rare case
where picture->pDrawable->(width|height) > pixmap->drawable.(width|height)

v2: keep special case for solid

Signed-off-by: Jerome Glisse <jglisse at redhat.com>
---
 src/evergreen_exa.c     |    4 ++--
 src/r600_exa.c          |    4 ++--
 src/radeon_exa_render.c |   12 ++++++------
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c
index 883fa5c..10c53d0 100644
--- a/src/evergreen_exa.c
+++ b/src/evergreen_exa.c
@@ -844,8 +844,8 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix,
 
     /* Texture */
     if (pPict->pDrawable) {
-	tex_res.w               = pPict->pDrawable->width;
-	tex_res.h               = pPict->pDrawable->height;
+	tex_res.w               = pPix->drawable.width;
+	tex_res.h               = pPix->drawable.height;
 	repeatType              = pPict->repeat ? pPict->repeatType : RepeatNone;
     } else {
 	tex_res.w               = 1;
diff --git a/src/r600_exa.c b/src/r600_exa.c
index 21df084..55d6c23 100644
--- a/src/r600_exa.c
+++ b/src/r600_exa.c
@@ -861,8 +861,8 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix,
 
     /* Texture */
     if (pPict->pDrawable) {
-	tex_res.w               = pPict->pDrawable->width;
-	tex_res.h               = pPict->pDrawable->height;
+	tex_res.w               = pPix->drawable.width;
+	tex_res.h               = pPix->drawable.height;
 	repeatType              = pPict->repeat ? pPict->repeatType : RepeatNone;
     } else {
 	tex_res.w               = 1;
diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
index c673f2c..c2a73f1 100644
--- a/src/radeon_exa_render.c
+++ b/src/radeon_exa_render.c
@@ -360,8 +360,8 @@ static Bool R100TextureSetup(PicturePtr pPict, PixmapPtr pPix,
     struct radeon_exa_pixmap_priv *driver_priv;
 
     if (pPict->pDrawable) {
-	w = pPict->pDrawable->width;
-	h = pPict->pDrawable->height;
+	w = pPix->drawable.width;
+	h = pPix->drawable.height;
 	repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
     } else {
 	w = h = 1;
@@ -757,8 +757,8 @@ static Bool R200TextureSetup(PicturePtr pPict, PixmapPtr pPix,
     struct radeon_exa_pixmap_priv *driver_priv;
 
     if (pPict->pDrawable) {
-	w = pPict->pDrawable->width;
-	h = pPict->pDrawable->height;
+	w = pPix->drawable.width;
+	h = pPix->drawable.height;
 	repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
     } else {
 	w = h = 1;
@@ -1141,8 +1141,8 @@ static Bool R300TextureSetup(PicturePtr pPict, PixmapPtr pPix,
     TRACE;
 
     if (pPict->pDrawable) {
-	w = pPict->pDrawable->width;
-	h = pPict->pDrawable->height;
+	w = pPix->drawable.width;
+	h = pPix->drawable.height;
 	repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
     } else {
 	w = h = 1;
-- 
1.7.1



More information about the xorg-driver-ati mailing list