[Mesa-dev] [Patch] Sharing flags should disable tiling

davyaxel at free.fr davyaxel at free.fr
Tue Aug 13 21:42:37 PDT 2013




> On Mon, Aug 12, 2013 at 3:05 PM, Marek Olšák <maraeo at gmail.com> wrote:
>> On Mon, Aug 12, 2013 at 11:36 PM, Stéphane Marchesin
>> <stephane.marchesin at gmail.com> wrote:
>>>> Other than hybrid systems (of which
>>>> there are none with i915 graphics), is there any case where
>>>> __DRI_IMAGE_USE_SHARE can occur?
>>>
>>> You could do interesting things like cross-process sharing with it. I
>>> think it's worth doing it, no matter what. It's easy to pick up now,
>>> and hard to fix up later.
>>
>> Cross-process sharing is mandatory already and exposed via
>> resource_from_handle and resource_get_handle. I don't think this is
>> useful for cross-process sharing anyway, because it disables tiling.
>
> No, we need a different flag for this.  I can't speak to the gallium
> flag, but the __DRI_IMAGE_USE_SHARE flag is use for same-gpu cross
> process sharing under wayland, either using GEM names or Prime fd
> passing.  We can't drop tiling in this case, there's an obvious
> performance penalty.  We need a flag to indicate that a buffer will be
> used on multiple GPUs.  The next level up in the stack
> (src/egl/drivers/dri2/platform_wayland.c in case of Wayland) needs to
> know whether or not a buffer will be used in this way and pass the
> flag when applicable.
>
> Kristian

I was planning to change platform_wayland.c not to use _DRI_IMAGE_USE_SHARE 
when self sharing. But after looking more closely, it seems that PIPE_BIND_SHARED 
would be necessary for gallium drivers for self-sharing too.

Since we want to enable tiling when we use self-sharing, my patch isn't adapted.
I should add a new flag to explicitly say we'll use cross-gpu sharing.

Should it be a new binding flag?

Axel Davy


More information about the mesa-dev mailing list