[PATCH:xf86-video-mach64] Mach64PixelARGB should use exaGetPixmapFirstPixel when EXA is in use
Alan Coopersmith
alan.coopersmith at oracle.com
Fri Dec 7 14:06:07 PST 2012
On 12/ 7/12 01:34 AM, Michel Dänzer wrote:
> On Don, 2012-12-06 at 16:57 -0800, Alan Coopersmith wrote:
>> Fixes crash attempting to read a pixel from a NULL pPixmap->devPrivate.ptr
>>
>> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
>> ---
>> src/atimach64render.c | 33 +++++++++++++++++++++------------
>> 1 file changed, 21 insertions(+), 12 deletions(-)
>>
>> Mostly just cut-and-paste and guess-and-hope, but it seems to work and stops
>> the crash for me.
>>
>> diff --git a/src/atimach64render.c b/src/atimach64render.c
>> index 4862cd4..1328cca 100644
>> --- a/src/atimach64render.c
>> +++ b/src/atimach64render.c
>> @@ -208,22 +208,31 @@ Mach64PixelARGB(PixmapPtr pPixmap, CARD32 format, CARD32 *argb)
>> CARD32 pixel;
>> CARD8 comp;
>> int bits, shift;
>> +#ifdef USE_EXA
>> + ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pPixmap->drawable.pScreen);
>> + ATIPtr pATI = ATIPTR(pScreenInfo);
>> +#endif
>>
>> /* Ensure that texture drawing has completed. */
>> exaWaitSync(pPixmap->drawable.pScreen);
>
> This call shouldn't be necessary anymore.
Okay, I'll remove it.
> Also, this whole file is only compiled for EXA, so you don't need to
> check for EXA or keep any non-EXA code paths.
Oh yuck, I see know that it's not built directly, but gets compiled
via src/atimach64exa.c: #include "atimach64render.c"
That's just gross, but knowing about it simplifies this patch.
--
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Engineering - http://blogs.oracle.com/alanc
More information about the xorg-devel
mailing list