diff options
author | Alex Deucher <alex@samba.(none)> | 2008-01-16 16:55:42 -0500 |
---|---|---|
committer | Alex Deucher <alex@samba.(none)> | 2008-01-16 16:55:42 -0500 |
commit | 3c72b100bcfacee600644669b586e86cfd32754e (patch) | |
tree | fe298f56e0f2e10383c63adb085c005739700256 /src/radeon_exa.c | |
parent | 2ba3562d2af911fdd90881049599e239d27260bc (diff) |
R300: First pass at render accel
This first pass is pretty limited. All it currently supports
is transforms for rotation. No blending yet.
Based on inital implementation from Wolke Liu with
additional lock-up fixes by Dave Airlie.
Diffstat (limited to 'src/radeon_exa.c')
-rw-r--r-- | src/radeon_exa.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/radeon_exa.c b/src/radeon_exa.c index 4da4841a..3b0c734d 100644 --- a/src/radeon_exa.c +++ b/src/radeon_exa.c @@ -105,6 +105,23 @@ RADEONLog2(int val) return bits - 1; } +static __inline__ int +RADEONPow2(int num) +{ + int pot = 2; + + if (num <= 2) + return num; + + while (pot < num) { + pot *= 2; + } + + return pot; +} + + + static __inline__ CARD32 F_TO_DW(float val) { union { |