[Mesa-dev] [PATCH 00/13] Threaded Gallium for RadeonSI

Marek Olšák maraeo at gmail.com
Thu May 11 21:01:22 UTC 2017


On Thu, May 11, 2017 at 9:02 PM, Nicolai Hähnle <nhaehnle at gmail.com> >
Some general remarks:
>
> Violating the "async" promise on debug callbacks is a problem. This breaks
> the OpenGL API in a place where it wasn't broken before, and that's not
> okay. I'm not sure what to do about this precisely, but the spec is very
> explicit:
>
>    "When DEBUG_OUTPUT_SYNCHRONOUS is enabled, the driver guarantees
>     synchronous calls to the callback routine by the context. When
>     synchronous callbacks are enabled, all calls to the callback
>     routine will be made by the thread that owns the current context;
>     all such calls will be made serially by the current context; and
>     each call will be made before the GL command that generated the
>     debug message is allowed to return."
>
> The last part is the strictest and implies that sync-ing becomes mandatory.
>
> Maybe this can be handled without a performance impact by swapping out
> pipe_context function pointers when the debug callback changes to !async.

We can probably just drop !async set_debug_callback calls and handle
shader-db as a special case, e.g. set GALLIUM_THREAD=0 in
shader-db/run.

Marek


More information about the mesa-dev mailing list