vdpau: skip vlVdpOutputSurfacePutBitsNative with a zero-area rectangle

This prevents errors:
"EE r600_texture.c:1571 r600_texture_transfer_map - failed to create
 temporary texture to hold untiled copy"

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99542

Tested-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Christian König <christian.koenig@amd.com>
This commit is contained in:
Marek Olšák 2017-02-12 15:48:48 +01:00
parent c196efcf03
commit 0561b3c75a
1 changed files with 7 additions and 0 deletions

View File

@ -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);