[PATCH 1/2] glamor: Add GLAMOR_ACCESS_WO
Marek Olšák
maraeo at gmail.com
Wed Aug 24 15:36:14 UTC 2016
On Wed, Aug 24, 2016 at 5:27 AM, Michel Dänzer <michel at daenzer.net> wrote:
>
> Adding Marek and Nicolai, maybe they have some feedback from a GL
> (driver) perspective.
>
>
> On 23/08/16 10:41 AM, Dave Airlie wrote:
>> From: Michel Dänzer <michel.daenzer at amd.com>
>>
>> [airlied: rebased onto master -
>> I left WO alone as it's more like the GL interface
>> review suggested changing it to bits.]
>
> After realizing that patch 2 can only affect the !ZPixmap case, I tested
> this series with
>
> x11perf -putimagexy{10,100,500} -shmputxy{10,100,500}
>
> and to my surprise, all of the numbers went down by around an order of
> magnitude (using radeonsi on Kaveri). I investigated a little bit what's
> going on:
>
>
>> @@ -86,7 +86,10 @@ glamor_prep_pixmap_box(PixmapPtr pixmap, glamor_access_t access, BoxPtr box)
>> if (priv->pbo == 0)
>> glGenBuffers(1, &priv->pbo);
>>
>> - gl_usage = GL_STREAM_READ;
>> + if (access == GLAMOR_ACCESS_WO)
>> + gl_usage = GL_STREAM_DRAW;
>> + else
>> + gl_usage = GL_STREAM_READ;
>>
>> glBindBuffer(GL_PIXEL_PACK_BUFFER, priv->pbo);
>> glBufferData(GL_PIXEL_PACK_BUFFER,
>
> This change results in write-combining for the PBO CPU mapping.
> Apparently, fbPutXYImage ends up either reading from the PBO, or at
> least writing to it in a WC-unfriendly manner, causing a big slowdown.
GL_STREAM_READ means cached GART. GL_STREAM_DRAW means uncached WC GART.
Marek
More information about the xorg-devel
mailing list