Bug 6911

Summary: exaTryDriverSolidFill() should bail out when exaGetPixelFromRGBA() fails.
Product: xorg Reporter: George - <fufutos610>
Component: Server/Acceleration/EXAAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high Keywords: patch
Version: git   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 6877    
Attachments:
Description Flags
Check both exaGet*From* in one statement none

Description George - 2006-05-14 09:24:47 UTC
If I scale the alpha channel in rendercheck/eval_diff similar to the color
channel, rendercheck fails on me for A8 dst.

The above fixes the failures for A8 dst, but I'am not sure that this is the
actual problem or masks it for me, so please verify.
Comment 1 Michel Dänzer 2006-05-16 01:09:37 UTC
Do you mean exaTryDriverSolidFill() should return 0 instead of -1 in this case?
Comment 2 George - 2006-05-16 01:57:08 UTC
I refer to exaGetPixelFromRGBA(), for which exaTryDriverSolidFill() does not
check the return value at all.

diff -r1.32 exa_render.c
285,286c285,290
<     exaGetPixelFromRGBA(&pixel, red, green, blue, alpha,
<                       pDst->format);
---
>     if (!exaGetPixelFromRGBA(&pixel, red, green, blue, alpha,
>                       pDst->format))
>     {
>       REGION_UNINIT(pDst->pDrawable->pScreen, &region);
>       return -1;
>     }
Comment 3 Michel Dänzer 2006-05-16 02:07:00 UTC
I have revision 1.32 of exa_render.c, and it does exactly that.
Comment 4 Michel Dänzer 2006-05-16 02:12:38 UTC
Ignore me, I confused exaGetRGBAFromPixel and exaGetPixelFromRGBA. :}
Comment 5 Michel Dänzer 2006-06-21 01:40:41 UTC
Created attachment 6003 [details] [review]
Check both exaGet*From* in one statement

How about this one instead?
Comment 6 Michel Dänzer 2006-06-24 06:40:19 UTC
I pushed your patch, as it's more consistent with the surrounding code.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.