diff options
author | Michel Dänzer <daenzer@vmware.com> | 2009-02-11 17:39:21 +0100 |
---|---|---|
committer | Michel Dänzer <daenzer@vmware.com> | 2009-02-11 17:39:21 +0100 |
commit | 9b912aab43fc57fb7d5c7b291b90634992a8842e (patch) | |
tree | 338ebdd7a72212b4777263a4c2addf555d62c8f1 /src/gallium/state_trackers/g3dvl | |
parent | 4617981ec72f7985941bee4b03c534d97ff96bc6 (diff) |
g3dvl: Fixups for introduction of pipe_transfer.
Diffstat (limited to 'src/gallium/state_trackers/g3dvl')
-rw-r--r-- | src/gallium/state_trackers/g3dvl/vl_r16snorm_mc_buf.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/gallium/state_trackers/g3dvl/vl_r16snorm_mc_buf.c b/src/gallium/state_trackers/g3dvl/vl_r16snorm_mc_buf.c index d53482f579..fb9585063e 100644 --- a/src/gallium/state_trackers/g3dvl/vl_r16snorm_mc_buf.c +++ b/src/gallium/state_trackers/g3dvl/vl_r16snorm_mc_buf.c @@ -66,7 +66,7 @@ struct vlR16SnormBufferedMC struct vlVertex2f zero_block[3]; unsigned int num_macroblocks; struct vlMpeg2MacroBlock *macroblocks; - struct pipe_surface *tex_surface[3]; + struct pipe_transfer *tex_transfer[3]; short *texels[3]; struct pipe_context *pipe; @@ -187,7 +187,7 @@ static inline int vlGrabBlocks assert(mc); assert(blocks); - tex_pitch = mc->tex_surface[0]->stride / mc->tex_surface[0]->block.size; + tex_pitch = mc->tex_transfer[0]->stride / mc->tex_transfer[0]->block.size; texels = mc->texels[0] + mbpy * tex_pitch + mbpx; for (y = 0; y < 2; ++y) @@ -235,7 +235,7 @@ static inline int vlGrabBlocks for (tb = 0; tb < 2; ++tb) { - tex_pitch = mc->tex_surface[tb + 1]->stride / mc->tex_surface[tb + 1]->block.size; + tex_pitch = mc->tex_transfer[tb + 1]->stride / mc->tex_transfer[tb + 1]->block.size; texels = mc->texels[tb + 1] + mbpy * tex_pitch + mbpx; if ((coded_block_pattern >> (1 - tb)) & 1) @@ -635,8 +635,8 @@ static int vlFlush for (i = 0; i < 3; ++i) { - pipe_surface_unmap(mc->tex_surface[i]); - pipe_surface_reference(&mc->tex_surface[i], NULL); + pipe->screen->transfer_unmap(pipe->screen, mc->tex_transfer[i]); + pipe->screen->tex_transfer_release(pipe->screen, &mc->tex_transfer[i]); } mc->render_target.cbufs[0] = pipe->screen->get_tex_surface @@ -809,14 +809,16 @@ static int vlRenderMacroBlocksMpeg2R16SnormBuffered for (i = 0; i < 3; ++i) { - mc->tex_surface[i] = mc->pipe->screen->get_tex_surface + mc->tex_transfer[i] = mc->pipe->screen->get_tex_transfer ( mc->pipe->screen, mc->textures.all[i], - 0, 0, 0, PIPE_BUFFER_USAGE_CPU_WRITE | PIPE_BUFFER_USAGE_DISCARD + 0, 0, 0, PIPE_TRANSFER_WRITE, 0, 0, + surface->texture->width[0], + surface->texture->height[0] ); - mc->texels[i] = pipe_surface_map(mc->tex_surface[i], PIPE_BUFFER_USAGE_CPU_WRITE | PIPE_BUFFER_USAGE_DISCARD); + mc->texels[i] = mc->pipe->screen->transfer_map(mc->pipe->screen, mc->tex_transfer[i]); } } |