[Mesa-dev] [PATCH 2/4] st/dri2: Add shared flag to missing locations

Erik Faye-Lund kusmabite at gmail.com
Thu Oct 22 03:25:06 PDT 2015


On Thu, Oct 22, 2015 at 12:18 PM, Marek Olšák <maraeo at gmail.com> wrote:
> On Thu, Oct 22, 2015 at 10:56 AM, Erik Faye-Lund <kusmabite at gmail.com> wrote:
>> On Thu, Oct 22, 2015 at 10:54 AM, Marek Olšák <maraeo at gmail.com> wrote:
>>> On Thu, Oct 22, 2015 at 10:22 AM, Erik Faye-Lund <kusmabite at gmail.com> wrote:
>>>> On Wed, Oct 21, 2015 at 10:34 PM, Marek Olšák <maraeo at gmail.com> wrote:
>>>>> On Wed, Oct 21, 2015 at 12:28 PM, Axel Davy <axel.davy at ens.fr> wrote:
>>>>>> The PIPE_BIND_SHARED flag should be added whenever
>>>>>> the resource may be shared with another process.
>>>>>>
>>>>>> In particular if the resource is imported, or may
>>>>>> be exported, the flag should be used.
>>>>>
>>>>> This can't be enforced. EGL_MESA_image_dma_buf_export allows exporting
>>>>> any texture. Mesa can't know in advance if a texture will be exported.
>>>>
>>>> Could we not, at least in theory, crate a new texture and blit the old
>>>> one into it behind the scenes somehow when a texture gets exported?
>>>
>>> Sharing means textures are shared. There is no blitting allowed. Other
>>> users don't have to be notified that a shared texture has been
>>> rendered to.
>>
>> Maybe I wasn't clear enough: I meant to migrate the texture data over
>> to a new shared home, not to create a copy.
>
> Ok, well, in that case it's easier to just share the texture as-is.

Sure. This was more a theoretical question than a practical one, as
your initial statement sounded a bit black-and-white. I just remember
we had to do something along these lines this in the Mali-400 driver
back when EGL_image was introduced, because the image could be
consumed by things that were unable to deal with our tiling etc (like
video encoders/decoders). I might misremember, though.


More information about the mesa-dev mailing list