[Xorg-driver-geode] Rendering issue update

Huang, FrankR FrankR.Huang at amd.com
Thu Jun 3 02:06:04 PDT 2010

Make progress on OVER rendering operation.

Attached three pictures for comparison.


For current bug, explain my solve method. I use two steps to finish the OVER rendering, the first step is to do the SRC*(alpha of MASK),the result is SRC'

that is to say:

 SRC'r = SRCr * alpha of MASK

 SRC'g = SRCg * alpha of MASK

 SRC'b = SRCb * alpha of MASK

 SRC'a = SRCa * alpha of MASK

I put the result to a off-screen FB regeion.The next step is to do SRC' + (1- SRC'a)DEST, because the screen is RGB565, so omit the SRC''a. that is to say:

SRC''r = SRC'r + (1- SRC'a)DEST

SRC''g = SRC'g + (1- SRC'a)DEST

SRC''b = SRC'b + (1- SRC'a)DEST


Taks an example:

SRC = ARGB(0x949c4e27) MASK = A8(0x75)

So SRC' = ARGB(0x43472311)

Then SRC'' = RGB565...


The bug before is that the driver does a a*A+ (1-a)*B for OVER opearation. It is absolutely wrong. The real OVER operation should be A+(1-a)*B.



Attach three pictures for comparison. Still I will correct other bugs on rendering.


Geodepro_old.PNG is the old driver result for progressbar.

Geodepro.PNG is the new driver result for progressbar.

X1200pro.png is the ATI X1200 result for progressbar.






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



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.







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.





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-driver-geode/attachments/20100603/06d3b496/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x1200pro.png
Type: image/png
Size: 3452 bytes
Desc: x1200pro.png
URL: <http://lists.x.org/archives/xorg-driver-geode/attachments/20100603/06d3b496/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: geodepro.png
Type: image/png
Size: 4226 bytes
Desc: geodepro.png
URL: <http://lists.x.org/archives/xorg-driver-geode/attachments/20100603/06d3b496/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: geodepro_old.PNG
Type: image/png
Size: 8411 bytes
Desc: geodepro_old.PNG
URL: <http://lists.x.org/archives/xorg-driver-geode/attachments/20100603/06d3b496/attachment-0005.png>

More information about the Xorg-driver-geode mailing list