[Mesa-dev] Time to merge threaded GL dispatch? (aka glthread)

Eero Tamminen eero.t.tamminen at intel.com
Thu Feb 9 17:06:37 UTC 2017


On 09.02.2017 17:03, Marek Olšák wrote:
> On Thu, Feb 9, 2017 at 1:52 PM, Ian Romanick <idr at freedesktop.org> wrote:
>> No, it absolutely is not fine to merge.  We have never allowed such a
>> thing, and I'll be damned if I'll allow this project to start.  Things
>> that land that are known to be broken never actually get fixed.  Then we
>> have to waste time fielding bug reports and Phoronix threads because
>> users turn on the performance features and everything breaks.  It's just
>> a terrible idea.
> It does pass piglit, but only when it's disabled.
> We have to ask the question of how long it will take to reach the
> level of perfection that some people here demand. 1 year? 2? 4 years
> even? Are we willing to wait that long? Is there a sufficient minimum
> requirement on merging this project that's possible to reach within 2
> weeks? Instead of saying "absolutely not" and "terrible idea", why not
> just say "yes if X gets done"?

<disclaimer: I'm not a Mesa committer so my opinion doesn't count for much>

My personal feeling is that minimal merging criteria should be:
* no known segfaults
* no functional piglit failures (or if there are, they're known, 
somewhat investigated and commonly agreed to be OK for merging)

After the functional issues are fixed, performance issues are fine as 
long as it still clearly helps (>=10%?) some games.

In general, performance numbers for features that have functional 
issues, shouldn't be trusted.  If e.g. crashes are due to missing 
synchronization, does adding the required synchronization also lose the 
measured performance increase?

> If you only expect absolutism and perfectionism, you'll be very
> disappointed with this project. Doing a threaded GL dispatch is hard.
> NVIDIA had had performance issues with it for a very long time.

Those are fine.  Have they had also crashes or rendering issues?

Is realistic approach just automatically disabling threading when 
program uses problematic GL feature/version? (Can it be disabled if it's 
already in use?)

 > AMD doesn't even have a solution that can be enabled by default.
> I'm not heavily invested in this project (yet), so it won't bother me
> much if this doesn't get merged before mid-2017. If people wanna
> contribute, they can send me pull requests. (please do it early &
> often, don't wait until you have something that's good enough)
> I've been contemplating doing threaded gallium dispatch for a while
> now. It should be very easy if we copy some sync prevention tricks
> from radeonsi, and we might be able to enable it by default for all GL
> apps (core & compat) from day 1. That can be our short-term goal for
> gallium, while threaded GL can be our long-term goal and only limited
> to whitelisted apps for quite a while.

	- Eero

More information about the mesa-dev mailing list