diff options
author | Christian König <[email protected]> | 2012-02-26 12:40:47 +0100 |
---|---|---|
committer | Christian König <[email protected]> | 2012-03-02 13:14:22 +0100 |
commit | 494e0025d995fb2cab04474d13880ee438b0c868 (patch) | |
tree | e0f2db9d28c2c3deaeda3a48cbd646811b3aaf64 /src/gallium/state_trackers/vdpau/output.c | |
parent | a0571b135ef2fdc9ade78b476e0af154f0f8a1f6 (diff) |
st/vdpau: implement OutputSurfacePutBitsNative
Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/vdpau/output.c')
-rw-r--r-- | src/gallium/state_trackers/vdpau/output.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/vdpau/output.c b/src/gallium/state_trackers/vdpau/output.c index 873edac4962..c5d26895583 100644 --- a/src/gallium/state_trackers/vdpau/output.c +++ b/src/gallium/state_trackers/vdpau/output.c @@ -186,7 +186,26 @@ vlVdpOutputSurfacePutBitsNative(VdpOutputSurface surface, uint32_t const *source_pitches, VdpRect const *destination_rect) { - return VDP_STATUS_NO_IMPLEMENTATION; + vlVdpOutputSurface *vlsurface; + struct pipe_box dst_box; + struct pipe_context *pipe; + + vlsurface = vlGetDataHTAB(surface); + if (!vlsurface) + return VDP_STATUS_INVALID_HANDLE; + + pipe = vlsurface->device->context; + if (!pipe) + return VDP_STATUS_INVALID_HANDLE; + + vlVdpResolveDelayedRendering(vlsurface->device, NULL, NULL); + + dst_box = RectToPipeBox(destination_rect, vlsurface->sampler_view->texture); + pipe->transfer_inline_write(pipe, vlsurface->sampler_view->texture, 0, + PIPE_TRANSFER_WRITE, &dst_box, *source_data, + *source_pitches, 0); + + return VDP_STATUS_OK; } /** |