diff options
author | Marek Olšák <[email protected]> | 2017-02-12 15:48:48 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-02-14 21:47:51 +0100 |
commit | 0561b3c75af2e4bb216b686bf62ae9d89c584dc8 (patch) | |
tree | 566eb8ab18a7984b1e43c4df3eebf6d8141cdcf4 /src | |
parent | c196efcf034279a9d55dce3a7f02807ac803f5f4 (diff) |
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 <[email protected]>
Reviewed-by: Kai Wasserbäch <[email protected]>
Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/state_trackers/vdpau/output.c | 7 |
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); |