summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_gen_mipmap.c
diff options
context:
space:
mode:
authorZack Rusin <zackr@vmware.com>2009-02-02 23:47:16 -0500
committerZack Rusin <zackr@vmware.com>2009-02-02 23:47:16 -0500
commit5069bfed29bcee2c89c36c74c6d65d388eb7792e (patch)
tree2aef5035140ca24eef97b5d328e0c29d0460f3a8 /src/mesa/state_tracker/st_gen_mipmap.c
parentdf73c964d85d2f44d8c62558b5752b2f4443763f (diff)
downloadexternal_mesa3d-5069bfed29bcee2c89c36c74c6d65d388eb7792e.zip
external_mesa3d-5069bfed29bcee2c89c36c74c6d65d388eb7792e.tar.gz
external_mesa3d-5069bfed29bcee2c89c36c74c6d65d388eb7792e.tar.bz2
gallium: remove pipe_buffer from surfaces
this change disassociates, at least from the driver perspective, the surface from buffer. surfaces are technically now views on the textures so make it so by hiding the buffer in the internals of textures.
Diffstat (limited to 'src/mesa/state_tracker/st_gen_mipmap.c')
-rw-r--r--src/mesa/state_tracker/st_gen_mipmap.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c
index 9e5c350..6a3455a 100644
--- a/src/mesa/state_tracker/st_gen_mipmap.c
+++ b/src/mesa/state_tracker/st_gen_mipmap.c
@@ -128,11 +128,11 @@ fallback_generate_mipmap(GLcontext *ctx, GLenum target,
dstSurf = screen->get_tex_surface(screen, pt, face, dstLevel, zslice,
PIPE_BUFFER_USAGE_CPU_WRITE);
- srcData = (ubyte *) pipe_buffer_map(pipe->screen, srcSurf->buffer,
- PIPE_BUFFER_USAGE_CPU_READ)
+ srcData = (ubyte *) pipe_surface_map(srcSurf,
+ PIPE_BUFFER_USAGE_CPU_READ)
+ srcSurf->offset;
- dstData = (ubyte *) pipe_buffer_map(pipe->screen, dstSurf->buffer,
- PIPE_BUFFER_USAGE_CPU_WRITE)
+ dstData = (ubyte *) pipe_surface_map(dstSurf,
+ PIPE_BUFFER_USAGE_CPU_WRITE)
+ dstSurf->offset;
_mesa_generate_mipmap_level(target, datatype, comps,
@@ -144,8 +144,8 @@ fallback_generate_mipmap(GLcontext *ctx, GLenum target,
dstData,
dstSurf->stride); /* stride in bytes */
- pipe_buffer_unmap(pipe->screen, srcSurf->buffer);
- pipe_buffer_unmap(pipe->screen, dstSurf->buffer);
+ pipe_surface_unmap(srcSurf);
+ pipe_surface_unmap(dstSurf);
pipe_surface_reference(&srcSurf, NULL);
pipe_surface_reference(&dstSurf, NULL);