[Mesa-dev] [PATCH 2/4] DRI: Add DRIimage map and unmap functions

Eric Anholt eric at anholt.net
Tue May 3 23:38:10 UTC 2016


Rob Herring <robh at kernel.org> writes:

> On Mon, Apr 25, 2016 at 7:42 AM, Daniel Stone <daniel at fooishbar.org> wrote:
>> Hi,
>>
>> On 22 April 2016 at 19:12, Eric Anholt <eric at anholt.net> wrote:
>>> I think this needs a longer comment to explain what the interface does:
>>>
>>> "Returns a map of the specified region of a __DRIimage for the specified
>>> usage.
>>>
>>> flags must always include __DRI_IMAGE_TRANSFER_READ and may include
>>> __DRI_IMAGE_TRANSFER_WRITE if the mapping is written[*].  If
>>> __DRI_IMAGE_TRANSFER_WRITE is not included, behavior when writing the
>>> mapping is undefined.
>>
>> Hrm. Though the Gallium implementation currently forces READ, it seems
>> like drivers requiring transfer would benefit from READ being
>> optional, if it elides a copy of data which will just be overwritten
>> anyway. How about:
>> 'flags may include __DRI_IMAGE_TRANSFER_READ, which will populate the
>> mapping with the current buffer content. If __DRI_IMAGE_TRANSFER_READ
>> is not included in the flags, the buffer content at map time is
>> undefined. Users wanting to modify the mapping must include
>> __DRI_IMAGE_TRANSFER_WRITE; if __DRI_IMAGE_TRANSFER_WRITE is not
>> included, behaviour when writing the mapping is undefined.'
>
> Sounds good. I've made READ optional and added this text.
>
>>
>> Also, you're missing the footnote ... ?
>
> Not sure what you mean here. Can you elaborate?

Not sure what I meant there at this point, either.  Ignore.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160503/42a1cf3b/attachment.sig>


More information about the mesa-dev mailing list