[RFC] Poor man's acceleration of solid pictures for R3xx-R7xx
Alex Deucher
alexdeucher at gmail.com
Sat Apr 14 05:55:34 PDT 2012
2012/4/14 Michel Dänzer <michel at daenzer.net>:
> On Fre, 2012-04-13 at 13:30 -0400, Alex Deucher wrote:
>> 2012/4/13 Michel Dänzer <michel at daenzer.net>:
>> >
>> > The patch below implements basic acceleration of solid pictures via
>> > scratch 1x1 pixmaps. It seems to at least alleviate some of the
>> > corruption and performance issues exposed by Cairo 1.12, and should also
>> > improve performance for other toolkits/apps using solid pictures.
>> >
>> > If there are no objections to this approach, maybe someone else can beat
>> > me to extending this for Evergreen+ and R1/2xx.
>>
>> Attached.
>
> Thanks Alex!
>
>
>> @@ -809,24 +798,24 @@ static void EVERGREENXFormSetup(PicturePtr
>> pPict, PixmapPtr pPix,
>> vs_alu_consts[0 + const_offset] =
>> xFixedToFloat(pPict->transform->matrix[0][0]);
>> vs_alu_consts[1 + const_offset] =
>> xFixedToFloat(pPict->transform->matrix[0][1]);
>> vs_alu_consts[2 + const_offset] =
>> xFixedToFloat(pPict->transform->matrix[0][2]);
>> - vs_alu_consts[3 + const_offset] = 1.0 / w;
>> + vs_alu_consts[3 + const_offset] = 1.0 /
>> pPict->pDrawable->width;
>>
>> vs_alu_consts[4 + const_offset] =
>> xFixedToFloat(pPict->transform->matrix[1][0]);
>> vs_alu_consts[5 + const_offset] =
>> xFixedToFloat(pPict->transform->matrix[1][1]);
>> vs_alu_consts[6 + const_offset] =
>> xFixedToFloat(pPict->transform->matrix[1][2]);
>> - vs_alu_consts[7 + const_offset] = 1.0 / h;
>> + vs_alu_consts[7 + const_offset] = 1.0 /
>> pPict->pDrawable->height;
>> } else {
>> accel_state->is_transform[unit] = FALSE;
>>
>> vs_alu_consts[0 + const_offset] = 1.0;
>> vs_alu_consts[1 + const_offset] = 0.0;
>> vs_alu_consts[2 + const_offset] = 0.0;
>> - vs_alu_consts[3 + const_offset] = 1.0 / w;
>> + vs_alu_consts[3 + const_offset] = 1.0 /
>> pPict->pDrawable->width;
>>
>> vs_alu_consts[4 + const_offset] = 0.0;
>> vs_alu_consts[5 + const_offset] = 1.0;
>> vs_alu_consts[6 + const_offset] = 0.0;
>> - vs_alu_consts[7 + const_offset] = 1.0 / h;
>> + vs_alu_consts[7 + const_offset] = 1.0 /
>> pPict->pDrawable->height;
>> }
>>
>> }
>
> This will still crash with solid pictures. Probably easiest to keep the
> w/h locals and assign 1 to them if pPict->pDrawable == NULL.
Fixed.
>
>
>> - max_tex_w = 8192;
>> - max_tex_h = 8192;
>> - max_dst_w = 8192;
>> - max_dst_h = 8192;
>> + if (pSrcPixmap->drawable.width >= 16384 ||
>> + pSrcPixmap->drawable.height >= 16384) {
>
> Looks like there's a bug fix hidden here. :)
>
Actually the hw limits are 16k :) It was just remnants of the r6xx code.
>
> The rest looks good to me.
>
>
> --
> Earthling Michel Dänzer | http://www.amd.com
> Libre software enthusiast | Debian, X and DRI developer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-poor-man-s-solid-picture-support-for-evergreen.patch
Type: text/x-patch
Size: 11054 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-driver-ati/attachments/20120414/945539c7/attachment-0001.bin>
More information about the xorg-driver-ati
mailing list