[Mesa-dev] [PATCH 02/10] dri_interface: add __DRI_IMAGE_TRANSFER_USER_STRIDE
Eric Anholt
eric at anholt.net
Mon Apr 30 19:11:51 UTC 2018
Marek Olšák <maraeo at gmail.com> writes:
> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
>
> Allow the caller to specify the row stride (in bytes) with which an image
> should be mapped. Note that completely ignoring USER_STRIDE is a valid
> implementation of mapImage.
>
> This is horrible API design. Unfortunately, cros_gralloc does indeed have
> a horrible API design -- in that arbitrary images should be allowed to be
> mapped with the stride that a linear image of the same width would have.
>
> There is no separate capability bit because it's unclear how stricter
> requirements should be defined.
I think that this is a bad interface, and you should just push an extra
copy into the caller so that they're encouraged to fix their bad API
instead of pushing their mistake down into Mesa ABI that we get stuck
with forever.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180430/f4e22c16/attachment.sig>
More information about the mesa-dev
mailing list