summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_context.h
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2011-10-23 10:44:47 -0600
committerBrian Paul <brianp@vmware.com>2011-10-23 10:44:47 -0600
commit68da4b50e9b6aa72a9b155f650952620063e1b94 (patch)
tree369f3d98b315e6a000f3d45ad96b006aebc310e0 /src/mesa/swrast/s_context.h
parent66681b4c8cb1ef16f42c1591298cb30c83bca09b (diff)
downloadexternal_mesa3d-68da4b50e9b6aa72a9b155f650952620063e1b94.zip
external_mesa3d-68da4b50e9b6aa72a9b155f650952620063e1b94.tar.gz
external_mesa3d-68da4b50e9b6aa72a9b155f650952620063e1b94.tar.bz2
mesa: add swrast_texture_image::Buffer
In the past, swrast_texture_image::Data has been overloaded. It could either point to malloc'd memory storing texture data, or it could point to a current mapping of GPU memory. Now, Buffer always points to malloc'd memory (if we're not using GPU memory) and Data always points to mapped memory. The next step would be to rename Data -> Map. This change also involves adding swrast functions for mapping textures and renderbuffers prior to rendering to setup the Data pointer. Plus, corresponding functions to unmap texures and renderbuffers. This is very much like similar code in the dri drivers.
Diffstat (limited to 'src/mesa/swrast/s_context.h')
-rw-r--r--src/mesa/swrast/s_context.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h
index 55f7c31..a83ac61 100644
--- a/src/mesa/swrast/s_context.h
+++ b/src/mesa/swrast/s_context.h
@@ -144,6 +144,9 @@ struct swrast_texture_image
each 2D slice in 'Data', in texels */
GLubyte *Data; /**< Image data, accessed via FetchTexel() */
+ /** Malloc'd texure memory */
+ GLubyte *Buffer;
+
FetchTexelFunc FetchTexel;
StoreTexelFunc Store;
};
@@ -333,6 +336,31 @@ swrast_render_finish(struct gl_context *ctx)
}
+extern void
+_swrast_span_render_start(struct gl_context *ctx);
+
+extern void
+_swrast_span_render_finish(struct gl_context *ctx);
+
+extern void
+_swrast_map_textures(struct gl_context *ctx);
+
+extern void
+_swrast_unmap_textures(struct gl_context *ctx);
+
+extern void
+_swrast_map_texture(struct gl_context *ctx, struct gl_texture_object *texObj);
+
+extern void
+_swrast_unmap_texture(struct gl_context *ctx, struct gl_texture_object *texObj);
+
+
+extern void
+_swrast_map_renderbuffers(struct gl_context *ctx);
+
+extern void
+_swrast_unmap_renderbuffers(struct gl_context *ctx);
+
/**
* Size of an RGBA pixel, in bytes, for given datatype.