diff options
author | Michel Dänzer <[email protected]> | 2009-02-18 16:43:02 +0100 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2009-02-18 16:43:02 +0100 |
commit | 3bd7c5ceffc88a052c5e8e114df2f2c7549ddb4a (patch) | |
tree | bdb352609c3ef21875a2699428e26b8c8c930f73 /src/gallium/state_trackers | |
parent | 76d8951fd3adbb91b2f71d461eec0f304619ca0b (diff) | |
parent | b89aa1d87ad6cebdbb3f2067863c600f50bf0ff1 (diff) |
Merge branch 'gallium-texture-transfer'
Conflicts:
src/gallium/drivers/softpipe/sp_tile_cache.c
Diffstat (limited to 'src/gallium/state_trackers')
-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 2176bb86d8a..7cd753f7363 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]); } } |