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.
This commit is contained in:
Brian Paul
2011-10-23 10:44:47 -06:00
parent 66681b4c8c
commit 68da4b50e9
8 changed files with 225 additions and 36 deletions

View File

@@ -68,6 +68,8 @@ struct vp_stage_data {
GLubyte *clipmask; /**< clip flags */
GLubyte ormask, andmask; /**< for clipping */
GLboolean vertex_textures;
struct gl_program_machine machine;
};