this avoids an extra copy which occurs in case of dri2 Suggested-by: Christian König <christian.koe...@amd.com> Signed-off-by: Nayan Deshmukh <nayan26deshm...@gmail.com> --- src/gallium/state_trackers/vdpau/presentation.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/src/gallium/state_trackers/vdpau/presentation.c b/src/gallium/state_trackers/vdpau/presentation.c index f35d73a..9051b49 100644 --- a/src/gallium/state_trackers/vdpau/presentation.c +++ b/src/gallium/state_trackers/vdpau/presentation.c @@ -231,12 +231,16 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue, vscreen = pq->device->vscreen; pipe_mutex_lock(pq->device->mutex); +#if defined(HAVE_DRI3) + vscreen->set_output_texture(vscreen, surf->surface->texture, clip_width, clip_height); +#endif tex = vscreen->texture_from_drawable(vscreen, (void *)pq->drawable); if (!tex) { pipe_mutex_unlock(pq->device->mutex); return VDP_STATUS_INVALID_HANDLE; } +#if !defined(HAVE_DRI3) dirty_area = vscreen->get_dirty_area(vscreen); memset(&surf_templ, 0, sizeof(surf_templ)); @@ -269,6 +273,7 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue, vl_compositor_set_dst_clip(cstate, &dst_clip); vl_compositor_render(cstate, compositor, surf_draw, dirty_area, true); } +#endif vscreen->set_next_timestamp(vscreen, earliest_presentation_time); @@ -297,8 +302,10 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue, framenum++; } +#if !defined(HAVE_DRI3) pipe_resource_reference(&tex, NULL); pipe_surface_reference(&surf_draw, NULL); +#endif pipe_mutex_unlock(pq->device->mutex); return VDP_STATUS_OK; -- 2.7.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev