summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmeric Grange <[email protected]>2011-09-12 23:39:32 +0200
committerChristian König <[email protected]>2011-09-14 15:49:16 +0200
commit6cf0581159a33f3dc10be38cdc7ab94d9cbacc1e (patch)
tree263841a3380674e3efe782e90807541a1267b940
parent85534e6f48c1ad6ff8dee77e0407c6c3dedb4b84 (diff)
st/vdpau: Output surfaces that are too large to fit into the display target will be clipped
Signed-off-by: Emeric Grange <[email protected]> Reviewed-by: Christian König <[email protected]>
-rw-r--r--src/gallium/state_trackers/vdpau/presentation.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/vdpau/presentation.c b/src/gallium/state_trackers/vdpau/presentation.c
index b3b543b4a80..d83dde647ee 100644
--- a/src/gallium/state_trackers/vdpau/presentation.c
+++ b/src/gallium/state_trackers/vdpau/presentation.c
@@ -185,6 +185,7 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue,
vlVdpPresentationQueue *pq;
vlVdpOutputSurface *surf;
struct pipe_surface *drawable_surface;
+ struct pipe_video_rect vo_rect;
pq = vlGetDataHTAB(presentation_queue);
if (!pq)
@@ -198,9 +199,14 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue,
if (!surf)
return VDP_STATUS_INVALID_HANDLE;
+ vo_rect.x = 0;
+ vo_rect.y = 0;
+ vo_rect.w = clip_width;
+ vo_rect.h = clip_height;
+
vl_compositor_clear_layers(&pq->compositor);
vl_compositor_set_rgba_layer(&pq->compositor, 0, surf->sampler_view, NULL, NULL);
- vl_compositor_render(&pq->compositor, drawable_surface, NULL, NULL, true);
+ vl_compositor_render(&pq->compositor, drawable_surface, NULL, &vo_rect, true);
pq->device->context->pipe->screen->flush_frontbuffer
(