diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2010-12-03 01:25:41 -0500 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2010-12-03 01:36:17 -0500 |
commit | f074762fff4253a457cb48519bb33a2e2c90f8b9 (patch) | |
tree | 3bb363983df4f3a132ee36191f333747590caa42 /src/radeon_exa.c | |
parent | 774b114baa932078f8bf91ea302850a8c54c2c07 (diff) |
radeon/exa: fallback for non-affine transforms
We need to implement a texture lookup with perspective
divide for non-affine transforms. For now just fallback.
Should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=31799
although it appears either EXA or the xserver gets this
wrong too.
Diffstat (limited to 'src/radeon_exa.c')
-rw-r--r-- | src/radeon_exa.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/radeon_exa.c b/src/radeon_exa.c index 503d569b..9c40da79 100644 --- a/src/radeon_exa.c +++ b/src/radeon_exa.c @@ -174,6 +174,18 @@ Bool RADEONGetPixmapOffsetPitch(PixmapPtr pPix, uint32_t *pitch_offset) return RADEONGetOffsetPitch(pPix, bpp, pitch_offset, offset, pitch); } +/** + * Returns whether the provided transform is affine. + * + * transform may be null. + */ +Bool radeon_transform_is_affine(PictTransformPtr t) +{ + if (t == NULL) + return TRUE; + return t->matrix[2][0] == 0 && t->matrix[2][1] == 0; +} + #if X_BYTE_ORDER == X_BIG_ENDIAN static unsigned long swapper_surfaces[6]; |