aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/vdpau/output.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/vdpau/output.c b/src/gallium/state_trackers/vdpau/output.c
index 8b26f7a81ab..650628014bd 100644
--- a/src/gallium/state_trackers/vdpau/output.c
+++ b/src/gallium/state_trackers/vdpau/output.c
@@ -263,6 +263,13 @@ vlVdpOutputSurfacePutBitsNative(VdpOutputSurface surface,
pipe_mutex_lock(vlsurface->device->mutex);
dst_box = RectToPipeBox(destination_rect, vlsurface->sampler_view->texture);
+
+ /* Check for a no-op. (application bug?) */
+ if (!dst_box.width || !dst_box.height) {
+ pipe_mutex_unlock(vlsurface->device->mutex);
+ return VDP_STATUS_OK;
+ }
+
pipe->texture_subdata(pipe, vlsurface->sampler_view->texture, 0,
PIPE_TRANSFER_WRITE, &dst_box, *source_data,
*source_pitches, 0);