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;
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)
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)
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
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]);
}
}