gallium/dri: let the driver know if the imported image is DRI_PRIME buffer

Use createImageFromFds2 together with __DRI_IMAGE_PRIME_LINEAR_BUFFER, so
the driver's resource_from_handle hook will be aware that this specific
image is the linear buffer.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13362>
This commit is contained in:
Pierre-Eric Pelloux-Prayer
2021-10-14 15:12:12 +02:00
parent 7a5de84249
commit e9c3dbd046
4 changed files with 25 additions and 9 deletions

View File

@@ -1411,6 +1411,7 @@ enum __DRIChromaSiting {
* Flags for createImageFromDmaBufs3 and createImageFromFds2
*/
#define __DRI_IMAGE_PROTECTED_CONTENT_FLAG 0x00000001
#define __DRI_IMAGE_PRIME_LINEAR_BUFFER 0x00000002
/**
* queryDmaBufFormatModifierAttribs attributes