gallium/dri: add missing PIPE_BIND_DRI_PRIME handling
e9c3dbd046
added PIPE_BIND_DRI_PRIME but it was only set when
importing a prime buffer.
This commit adds handling of this flag in the other codepath = the
one where the prime buffer is allocated by the render GPU.
With this change PIPE_BIND_DRI_PRIME is still only set for the
render GPU - the display GPU will never see this flag; a future
commit will rename it.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14615>
This commit is contained in:

committed by
Marge Bot

parent
3926be368e
commit
42c149e36b
@@ -1222,6 +1222,7 @@ struct __DRIdri2ExtensionRec {
|
|||||||
*/
|
*/
|
||||||
#define __DRI_IMAGE_USE_BACKBUFFER 0x0010
|
#define __DRI_IMAGE_USE_BACKBUFFER 0x0010
|
||||||
#define __DRI_IMAGE_USE_PROTECTED 0x0020
|
#define __DRI_IMAGE_USE_PROTECTED 0x0020
|
||||||
|
#define __DRI_IMAGE_USE_PRIME_BUFFER 0x0040
|
||||||
|
|
||||||
|
|
||||||
#define __DRI_IMAGE_TRANSFER_READ 0x1
|
#define __DRI_IMAGE_TRANSFER_READ 0x1
|
||||||
|
@@ -1099,6 +1099,8 @@ dri2_create_image_common(__DRIscreen *_screen,
|
|||||||
}
|
}
|
||||||
if (use & __DRI_IMAGE_USE_PROTECTED)
|
if (use & __DRI_IMAGE_USE_PROTECTED)
|
||||||
tex_usage |= PIPE_BIND_PROTECTED;
|
tex_usage |= PIPE_BIND_PROTECTED;
|
||||||
|
if (use & __DRI_IMAGE_USE_PRIME_BUFFER)
|
||||||
|
tex_usage |= PIPE_BIND_DRI_PRIME;
|
||||||
|
|
||||||
img = CALLOC_STRUCT(__DRIimageRec);
|
img = CALLOC_STRUCT(__DRIimageRec);
|
||||||
if (!img)
|
if (!img)
|
||||||
|
@@ -1557,7 +1557,8 @@ dri3_alloc_render_buffer(struct loader_dri3_drawable *draw, unsigned int format,
|
|||||||
__DRI_IMAGE_USE_SHARE |
|
__DRI_IMAGE_USE_SHARE |
|
||||||
__DRI_IMAGE_USE_LINEAR |
|
__DRI_IMAGE_USE_LINEAR |
|
||||||
__DRI_IMAGE_USE_BACKBUFFER |
|
__DRI_IMAGE_USE_BACKBUFFER |
|
||||||
__DRI_IMAGE_USE_SCANOUT,
|
__DRI_IMAGE_USE_SCANOUT |
|
||||||
|
__DRI_IMAGE_USE_PRIME_BUFFER,
|
||||||
buffer);
|
buffer);
|
||||||
|
|
||||||
pixmap_buffer = buffer->linear_buffer;
|
pixmap_buffer = buffer->linear_buffer;
|
||||||
|
Reference in New Issue
Block a user