mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-21 21:40:22 +01:00
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:
parent
3926be368e
commit
42c149e36b
3 changed files with 5 additions and 1 deletions
|
|
@ -1222,6 +1222,7 @@ struct __DRIdri2ExtensionRec {
|
|||
*/
|
||||
#define __DRI_IMAGE_USE_BACKBUFFER 0x0010
|
||||
#define __DRI_IMAGE_USE_PROTECTED 0x0020
|
||||
#define __DRI_IMAGE_USE_PRIME_BUFFER 0x0040
|
||||
|
||||
|
||||
#define __DRI_IMAGE_TRANSFER_READ 0x1
|
||||
|
|
|
|||
|
|
@ -1099,6 +1099,8 @@ dri2_create_image_common(__DRIscreen *_screen,
|
|||
}
|
||||
if (use & __DRI_IMAGE_USE_PROTECTED)
|
||||
tex_usage |= PIPE_BIND_PROTECTED;
|
||||
if (use & __DRI_IMAGE_USE_PRIME_BUFFER)
|
||||
tex_usage |= PIPE_BIND_DRI_PRIME;
|
||||
|
||||
img = CALLOC_STRUCT(__DRIimageRec);
|
||||
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_LINEAR |
|
||||
__DRI_IMAGE_USE_BACKBUFFER |
|
||||
__DRI_IMAGE_USE_SCANOUT,
|
||||
__DRI_IMAGE_USE_SCANOUT |
|
||||
__DRI_IMAGE_USE_PRIME_BUFFER,
|
||||
buffer);
|
||||
|
||||
pixmap_buffer = buffer->linear_buffer;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue