summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorChristian König <[email protected]>2012-02-10 12:56:27 +0100
committerChristian König <[email protected]>2012-02-21 11:13:20 +0100
commit0f194fc9e443ee6abd266737321655882e435970 (patch)
treea366b1ee3142d29c2412bf3127a04ba4ff989ca4 /src/gallium/state_trackers
parent736dda82ca5477b8976e2c6b810a71efe2337267 (diff)
st/vdpau: Use transfer_inline_write to upload ycbcr data
Uses less code and looks at least a bit cleaner than mapping manually. Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/vdpau/surface.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/src/gallium/state_trackers/vdpau/surface.c b/src/gallium/state_trackers/vdpau/surface.c
index 84467fdc0d2..a0ebe001aa8 100644
--- a/src/gallium/state_trackers/vdpau/surface.c
+++ b/src/gallium/state_trackers/vdpau/surface.c
@@ -239,24 +239,11 @@ vlVdpVideoSurfacePutBitsYCbCr(VdpVideoSurface surface,
sv->texture->width0, sv->texture->height0, 1
};
- struct pipe_transfer *transfer;
- void *map;
-
- transfer = pipe->get_transfer(pipe, sv->texture, 0, PIPE_TRANSFER_WRITE, &dst_box);
- if (!transfer)
- return VDP_STATUS_RESOURCES;
-
- map = pipe->transfer_map(pipe, transfer);
- if (map) {
- util_copy_rect(map, sv->texture->format, transfer->stride, 0, 0,
- dst_box.width, dst_box.height,
- source_data[i] + source_pitches[i] * j,
- source_pitches[i] * sv->texture->depth0,
- 0, 0);
- }
-
- pipe->transfer_unmap(pipe, transfer);
- pipe->transfer_destroy(pipe, transfer);
+ pipe->transfer_inline_write(pipe, sv->texture, 0,
+ PIPE_TRANSFER_WRITE, &dst_box,
+ source_data[i] + source_pitches[i] * j,
+ source_pitches[i] * sv->texture->depth0,
+ 0);
}
}