Mesa (pipe-video): vdpau: add compositor to presentation queue
Christian König
deathsimple at kemper.freedesktop.org
Fri Apr 8 23:40:11 UTC 2011
Module: Mesa
Branch: pipe-video
Commit: 6710e690f6ccd2c917d6a39be7d55a037470fccb
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6710e690f6ccd2c917d6a39be7d55a037470fccb
Author: Christian König <deathsimple at vodafone.de>
Date: Fri Apr 8 20:03:35 2011 +0200
vdpau: add compositor to presentation queue
---
src/gallium/state_trackers/vdpau/presentation.c | 19 ++++++++++++++++---
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 d4f6737..fadc57e 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 dca755e..f1f94ea 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
More information about the mesa-commit
mailing list