[Mesa-dev] [PATCH 05/10] gallium: wire up server_wait_sync

Marek Olšák maraeo at gmail.com
Fri Nov 18 22:35:37 UTC 2016


On Fri, Nov 18, 2016 at 11:17 PM, Rob Clark <robdclark at gmail.com> wrote:
> On Fri, Nov 18, 2016 at 5:07 PM, Marek Olšák <maraeo at gmail.com> wrote:
>> On Fri, Nov 18, 2016 at 2:39 PM, Rob Clark <robdclark at gmail.com> wrote:
>>> From: Rob Clark <robclark at freedesktop.org>
>>>
>>> This will be needed for explicit synchronization with devices outside
>>> the gpu, ie. EGL_ANDROID_native_fence_sync.
>>>
>>> Signed-off-by: Rob Clark <robclark at freedesktop.org>
>>> Reviewed-by: Marek Olšák <marek.olsak at amd.com>
>>> ---
>>>  src/gallium/include/pipe/p_context.h  | 6 ++++++
>>>  src/gallium/state_trackers/dri/dri2.c | 6 +++++-
>>>  2 files changed, 11 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h
>>> index b97aad5..ee8a511 100644
>>> --- a/src/gallium/include/pipe/p_context.h
>>> +++ b/src/gallium/include/pipe/p_context.h
>>> @@ -475,6 +475,12 @@ struct pipe_context {
>>>                   unsigned flags);
>>>
>>>     /**
>>> +    * Insert commands to have GPU wait for fence to be signaled.
>>> +    */
>>> +   void (*fence_server_sync)(struct pipe_context *pipe,
>>> +                             struct pipe_fence_handle *fence);
>>
>> BTW, why is it called "server_sync"? Do we have a server in gallium?
>
> only to differentiate from client-wait.. and because it is called from
> dri2_server_wait_sync() (which is called via
> __DRI2fenceExtension::server_wait_sync()).. it's telling the "server"
> (which is actually the CP) to wait.  I guess the terminology probably
> made sense about 15+ years ago before dri.. I find it kind of
> confusing, but figured it was better to stick w/ what the rest of the
> codebase (and gl specs) used..

OK, we can rename it later.

Marek


More information about the mesa-dev mailing list