summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian König <[email protected]>2013-05-08 17:03:01 +0200
committerChristian König <[email protected]>2013-05-14 15:16:15 +0200
commite195d301aeb50a33cc20b208900164a97524bef4 (patch)
treec74727d0ecacb1289fb00b934b482c4f24d46949 /src
parent176ad54c04f5b945e47b61a3cad4b6c87d883a41 (diff)
vl/vdpau: fix PresentationQueueQuerySurfaceStatus
The last queued surface always keeps displaying. Fixing a problem with XBMC. Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/vdpau/presentation.c8
-rw-r--r--src/gallium/state_trackers/vdpau/vdpau_private.h28
2 files changed, 19 insertions, 17 deletions
diff --git a/src/gallium/state_trackers/vdpau/presentation.c b/src/gallium/state_trackers/vdpau/presentation.c
index a5466cd378a..c9f8ea70ecc 100644
--- a/src/gallium/state_trackers/vdpau/presentation.c
+++ b/src/gallium/state_trackers/vdpau/presentation.c
@@ -238,8 +238,6 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue,
surf_templ.format = tex->format;
surf_draw = pipe->create_surface(pipe, tex, &surf_templ);
- surf->timestamp = (vlVdpTime)earliest_presentation_time;
-
dst_clip.x0 = 0;
dst_clip.y0 = 0;
dst_clip.x1 = clip_width ? clip_width : surf_draw->width;
@@ -276,6 +274,7 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue,
pipe->screen->fence_reference(pipe->screen, &surf->fence, NULL);
pipe->flush(pipe, &surf->fence, 0);
+ pq->last_surf = surf;
if (dump_window == -1) {
dump_window = debug_get_num_option("VDPAU_DUMP", 0);
@@ -360,7 +359,10 @@ vlVdpPresentationQueueQuerySurfaceStatus(VdpPresentationQueue presentation_queue
*first_presentation_time = 0;
if (!surf->fence) {
- *status = VDP_PRESENTATION_QUEUE_STATUS_IDLE;
+ if (pq->last_surf == surf)
+ *status = VDP_PRESENTATION_QUEUE_STATUS_VISIBLE;
+ else
+ *status = VDP_PRESENTATION_QUEUE_STATUS_IDLE;
} else {
pipe_mutex_lock(pq->device->mutex);
screen = pq->device->vscreen->pscreen;
diff --git a/src/gallium/state_trackers/vdpau/vdpau_private.h b/src/gallium/state_trackers/vdpau/vdpau_private.h
index 918a6c20a09..716d2180a6e 100644
--- a/src/gallium/state_trackers/vdpau/vdpau_private.h
+++ b/src/gallium/state_trackers/vdpau/vdpau_private.h
@@ -323,19 +323,6 @@ typedef struct
typedef struct
{
vlVdpDevice *device;
- Drawable drawable;
-} vlVdpPresentationQueueTarget;
-
-typedef struct
-{
- vlVdpDevice *device;
- Drawable drawable;
- struct vl_compositor_state cstate;
-} vlVdpPresentationQueue;
-
-typedef struct
-{
- vlVdpDevice *device;
struct vl_compositor_state cstate;
struct {
@@ -375,7 +362,6 @@ typedef uint64_t vlVdpTime;
typedef struct
{
- vlVdpTime timestamp;
vlVdpDevice *device;
struct pipe_surface *surface;
struct pipe_sampler_view *sampler_view;
@@ -387,6 +373,20 @@ typedef struct
typedef struct
{
vlVdpDevice *device;
+ Drawable drawable;
+} vlVdpPresentationQueueTarget;
+
+typedef struct
+{
+ vlVdpDevice *device;
+ Drawable drawable;
+ struct vl_compositor_state cstate;
+ vlVdpOutputSurface *last_surf;
+} vlVdpPresentationQueue;
+
+typedef struct
+{
+ vlVdpDevice *device;
struct pipe_video_decoder *decoder;
} vlVdpDecoder;