[Xorg-driver-geode] Rendering issue update

Huang, FrankR FrankR.Huang at amd.com
Tue Jun 1 18:39:10 PDT 2010


The bug is that when our driver handles the Over operation where source image has the alpha value and mask has the alpha value, our driver does the wrong thing. It uses the mask's alpha value to do the composite operation and omit the previous alpha value. The correct formula is that the source(ARGB) should be multiplied with the mask alpha value, then use the new alpha to do the OVER operation. I have done many experiments to prove that and guys from xorg-devel mail groug gives me the hint. 

In short, our driver is short of one pass of Source*(alpha of mask) and wrongly use a*A+(1-a)*B to do the OVER operation. See datasheet of Geode on GP_RASTER_MODE for detail.

I'll correct this huge bug and let you know my result.

 

 

Thanks,

Frank

 

________________________________

From: Huang, FrankR 
Sent: 2010Äê5ÔÂ24ÈÕ 18:49
To: Huang, FrankR; xorg-driver-geode at lists.x.org; xorg-devel at lists.x.org
Subject: RE: [Xorg-driver-geode] Rendering issue update

 

Hi,all

I am now using the rendercheck application from freedesktop to test the rendering issue of geode driver. Many guys suggested me use this program to test our driver¡¯s rendering issue and do the bugs fixed. Now it is time to do that after I am clear of the XRenderComposite() usage by my Xlib application.

That rendercheck application is a huge test on render. But we can use some specific tests(options) on our driver. Now following the suggestion on xorg-devel guy, I want to use blend and composite test with SRC, then OVER¡­ That could give more information and full tests on our driver to fix bugs.

By the way, I have modified the cairo library source code to let XRenderComposite() display the whole process of progressbar drawing on the screen instead of pict. Please see 15700 bug on freedesktop.

 

 

Thanks,

Frank 

 

________________________________

From: xorg-driver-geode-bounces+frankr.huang=amd.com at lists.x.org [mailto:xorg-driver-geode-bounces+frankr.huang=amd.com at lists.x.org] On Behalf Of Huang, FrankR
Sent: 2010Äê5ÔÂ12ÈÕ 17:13
To: xorg-driver-geode at lists.x.org
Subject: [Xorg-driver-geode] Rendering issue update

 

Hi, all

            

            For the rendering issue, I have written a simple Xlib program that triggers geode HW rendering( lx_do_composite() ). What the application does is as below :

1)       It creates a 100x100 window (color: white) for the destination picture

2)       It creates a picture of 1x1 with the format PICT_x8r8g8b8(color: green) for the source picture, the source picture has the repeat attribute.

3)       It creates a picture of 20x20 with the format PICT_a8(only alpha value to do alpha blend) for the mask picture.

4)       Call the XRenderComposite() to trigger. The dst_x and dst_y are all 50, width and height are all 40. the mask_x and mask_y are all 5. So the alpha blend green region is 15x15

See the result of Radeon_X1200.png. It is the standard result. Run on my RS690/SB600 workstation. The rending function FUNC_NAME(RadeonComposite) on X1200 will be called. 

 

            Because our driver can only support limit rendering, I choose this test case. This will use lx_do_composite() in the geode LX. I don¡¯t know why our driver must require the pSrc->width and pSrc->height with value of 1 in lx_prepare_composite(). I follow this requirement in this application. You can see the HW rendering result with the picture of Geode_lx.png on geode platform. Apparently, there must be some HW rendinging bug in our driver. I will use this program instead of the progressbar gtk application to go on debugging.

 

            Source code is in render_test.zip. 

            You can compiled it with ¡°gcc ¨Cg ¨Cv ¨CWall ¨Co render main.c ops.c tests_10x10.c ¨CLxxx ¨ClX11 ¨ClXrender¡±

 

            With the help of this application¡¯s debug, we will close to the root cause of this long-long ago historical rendering bug on geode platform.

 

 

Thanks,

Frank

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100602/ff719736/attachment.htm>


More information about the xorg-devel mailing list