diff options
Diffstat (limited to 'src')
-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]); } } |