Nicolai Hähnle wrote: > Hi, > > in the bufmgr-based rework of the r300 driver we want to override > gl_texture_image so that texture data is stored in buffer object without > backing store whenever possible. > > Our images have two fields, image->mt and image->base.Data which relate to > where image data is stored. If image->mt is non-NULL, the image is stored in > a buffer object and image->base.Data is non-NULL if and only if the image has > been explicitly mapped for software-based access. In this case, > image->base.Data simply points into the mapped region (okay, so it's actually > fake buffer manager backing store right now, but you get the idea). > > If image->mt is NULL, then everything behaves like it used to, i.e. > image->base.Data points to malloc()ed memory. > > Now I've run into trouble with _mesa_generate_mipmap because that function > calls FreeTexImageData only if image->base.Data is NULL. This is incorrect > when the image in question is stored in a buffer object. > > The following patch simply calls FreeTexImageData unconditionally, leaving > the > decision of what to do entirely to the driver. From a visual inspection, all > of the drivers that override FreeTexImageData check whether Data is NULL, so > this patch should be fine. Still, is this the right basic notion of what > should be done?
Yes, that looks fine. -Brian ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Mesa3d-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mesa3d-dev
