[Xorg] AllocateOffscreenLinear
Thomas Winischhofer
thomas at winischhofer.net
Sat Aug 14 06:18:34 PDT 2004
Both the radeon and the mga driver allocate offscreen memory for RENDER
acceleration using xf86AllocateOffscreenLinear(). However, the "size"
argument for this call is calculated differently:
The mga driver's RENDER acceleration calculates the "size" argument like
this (simplified):
size = width * height
if (pScrn->bitsPerPixel == 16) size <<= 1;
The radeon driver does this like this:
size = width * PICT_FORMAT_BPP(texFormat) * height
Both the mga and the radeon drivers' video code allocates offscreen
video memory calculating "size" like this:
size = (width * height) / (pScrn->bitsPerPixel >> 3)
So, what IS the unit of "size" for xf86AllocateOffscreenLinear()?
"pixel" (=bpp-dependent) or "byte"?
If it's "pixel", the radeon driver's RENDER acceleration is broken in
this regard.
Thomas
--
Thomas Winischhofer
Vienna/Austria
thomas AT winischhofer DOT net http://www.winischhofer.net/
twini AT xfree86 DOT org
More information about the xorg
mailing list