summaryrefslogtreecommitdiff
path: root/src/radeon_exa_render.c
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2010-02-24 22:46:28 -0500
committerAlex Deucher <alexdeucher@gmail.com>2010-02-26 14:50:53 -0500
commit2de0af5f5b806f9dbfdb1e9b6a5cf96d9433961d (patch)
treefe9f889c37439107cebac209847ec833540beafa /src/radeon_exa_render.c
parentc7e81d2f3a372e0d5f751dd0c5091aec2b56d936 (diff)
Use RADEON_ALIGN instead of open coding it.
Also fix some RADEON_ALIGN(x, 63), which would return incorrect results for odd x. Though this shouldn't happen, it's still not right. You wouldn't ever write (x + 62) & ~62 which is clearly wrong (and what it expands to). CC: Jerome Glisse <jglisse@redhat.com> CC: Alex Deucher <alexdeucher@gmail.com> CC: Dave Airlie <airlied@redhat.com> Signed-off-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/radeon_exa_render.c')
-rw-r--r--src/radeon_exa_render.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
index 15f4326f..e68faff2 100644
--- a/src/radeon_exa_render.c
+++ b/src/radeon_exa_render.c
@@ -263,7 +263,7 @@ static Bool RADEONPitchMatches(PixmapPtr pPix)
int h = pPix->drawable.height;
uint32_t txpitch = exaGetPixmapPitch(pPix);
- if (h > 1 && ((w * pPix->drawable.bitsPerPixel / 8 + 31) & ~31) != txpitch)
+ if (h > 1 && (RADEON_ALIGN(w * pPix->drawable.bitsPerPixel / 8, 32)) != txpitch)
return FALSE;
return TRUE;