mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-11 06:28:09 +02:00
vdpau: add compositor to presentation queue
This commit is contained in:
parent
b98b58c76a
commit
6710e690f6
2 changed files with 17 additions and 4 deletions
|
|
@ -41,9 +41,11 @@ vlVdpPresentationQueueCreate(VdpDevice device,
|
|||
VdpPresentationQueueTarget presentation_queue_target,
|
||||
VdpPresentationQueue *presentation_queue)
|
||||
{
|
||||
debug_printf("[VDPAU] Creating PresentationQueue\n");
|
||||
VdpStatus ret;
|
||||
vlVdpPresentationQueue *pq = NULL;
|
||||
struct pipe_video_context *context;
|
||||
VdpStatus ret;
|
||||
|
||||
_debug_printf("[VDPAU] Creating PresentationQueue\n");
|
||||
|
||||
if (!presentation_queue)
|
||||
return VDP_STATUS_INVALID_POINTER;
|
||||
|
|
@ -59,10 +61,19 @@ vlVdpPresentationQueueCreate(VdpDevice device,
|
|||
if (dev != pqt->device)
|
||||
return VDP_STATUS_HANDLE_DEVICE_MISMATCH;
|
||||
|
||||
context = dev->context->vpipe;
|
||||
|
||||
pq = CALLOC(1, sizeof(vlVdpPresentationQueue));
|
||||
if (!pq)
|
||||
return VDP_STATUS_RESOURCES;
|
||||
|
||||
pq->device = dev;
|
||||
pq->compositor = context->create_compositor(context);
|
||||
if (!pq->compositor) {
|
||||
ret = VDP_STATUS_ERROR;
|
||||
goto no_compositor;
|
||||
}
|
||||
|
||||
*presentation_queue = vlAddDataHTAB(pq);
|
||||
if (*presentation_queue == 0) {
|
||||
ret = VDP_STATUS_ERROR;
|
||||
|
|
@ -71,6 +82,7 @@ vlVdpPresentationQueueCreate(VdpDevice device,
|
|||
|
||||
return VDP_STATUS_OK;
|
||||
no_handle:
|
||||
no_compositor:
|
||||
FREE(pq);
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -129,7 +141,8 @@ vlVdpPresentationQueueBlockUntilSurfaceIdle(VdpPresentationQueue presentation_qu
|
|||
if (!first_presentation_time)
|
||||
return VDP_STATUS_INVALID_POINTER;
|
||||
|
||||
return VDP_STATUS_NO_IMPLEMENTATION;
|
||||
//return VDP_STATUS_NO_IMPLEMENTATION;
|
||||
return VDP_STATUS_OK;
|
||||
}
|
||||
|
||||
VdpStatus
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ typedef struct
|
|||
typedef struct
|
||||
{
|
||||
vlVdpDevice *device;
|
||||
Drawable drawable;
|
||||
struct pipe_video_compositor *compositor;
|
||||
} vlVdpPresentationQueue;
|
||||
|
||||
typedef struct
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue