diff options
author | Christian König <[email protected]> | 2011-04-08 20:03:35 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2011-04-08 20:03:35 +0200 |
commit | 6710e690f6ccd2c917d6a39be7d55a037470fccb (patch) | |
tree | 1447e6dc05bbf69cb5160d20c8b228059c3cd37d /src/gallium | |
parent | b98b58c76a2560b1db603e62f96c6641cedfa8e8 (diff) |
vdpau: add compositor to presentation queue
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/state_trackers/vdpau/presentation.c | 19 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/vdpau_private.h | 2 |
2 files changed, 17 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/vdpau/presentation.c b/src/gallium/state_trackers/vdpau/presentation.c index d4f67379ed2..fadc57e70c0 100644 --- a/src/gallium/state_trackers/vdpau/presentation.c +++ b/src/gallium/state_trackers/vdpau/presentation.c @@ -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 diff --git a/src/gallium/state_trackers/vdpau/vdpau_private.h b/src/gallium/state_trackers/vdpau/vdpau_private.h index dca755eb8d4..f1f94ea92ac 100644 --- a/src/gallium/state_trackers/vdpau/vdpau_private.h +++ b/src/gallium/state_trackers/vdpau/vdpau_private.h @@ -183,7 +183,7 @@ typedef struct typedef struct { vlVdpDevice *device; - Drawable drawable; + struct pipe_video_compositor *compositor; } vlVdpPresentationQueue; typedef struct |