[Mesa-dev] [PATCH v5 0/3] asynchronous pbo transfer with glthread
Michel Dänzer
michel at daenzer.net
Thu Apr 20 08:55:17 UTC 2017
On 20/04/17 05:28 PM, gregory hainaut wrote:
> On Thu, 20 Apr 2017 12:29:11 +0900
> Michel Dänzer <michel at daenzer.net> wrote:
>
>> On 20/04/17 01:54 AM, Gregory Hainaut wrote:
>>> Hello,
>>>
>>> Please find the latest version that include a small fix for hash deletion. I
>>> think the series is good now. Please review/ack it.
>>
>> I'm afraid I have to NACK it. As discussed in the v4 cover letter
>> thread, Mesa's glthread cannot make any libX11 API calls.
>>
>>
>
> Hello Michel,
>
> Just to be sure we are on the same line, let's me do a summary.
>
> PCSX2 does the following bad pattern
> 1/ no call to XInitThread
> 2/ XGetGeometry to get the size of the surface
> 3/ glDrawArray into the default framebuffer 0 (the window, I'm not sure how to call it)
> => which seem to call DRI2GetBuffersWithFormat under the hood. I guess to get the
> associated buffer of the window.
If this DRI2GetBuffersWithFormat call results in libX11 API calls on the
glthread, that's a bug which needs to be fixed, either by moving the
DRI2GetBuffersWithFormat call to the main thread or (if possible) by
changing DRI2GetBuffersWithFormat to use XCB directly.
> So far it was (kind of) working fine because PCSX2 does tons of PBO transfer. So glthread
> was mostly synchronous.
>
> This series removes the (useless) PBO transfer synchronization. So now glthread is really
> asynchronous and the above bad pattern crash as expected.
>
> I didn't add any libX11 API call on the patches.
It sounds like the glthread bug above exists independently from this
patch series, which might just make it more likely to result in a crash.
I think it would still be better to fix the bug before landing this series.
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
More information about the mesa-dev
mailing list