[Mesa-dev] [PATCH 1/3] mesa: move gl_texture_image::Data, RowStride, ImageOffsets to swrast

Eric Anholt eric at anholt.net
Wed Oct 12 09:57:04 PDT 2011


On Mon, 10 Oct 2011 20:27:44 -0600, Brian Paul <brian.e.paul at gmail.com> wrote:
> From: Brian Paul <brianp at vmware.com>
> 
> Only swrast and the drivers that fall back to swrast need these fields now.
> This removes the last of the fields related to software rendering from
> gl_texture_image.

> +   /* Allocate the swrast_texture_image::ImageOffsets array now */
> +   switch (texobj->Target) {
> +   case GL_TEXTURE_3D:
> +   case GL_TEXTURE_2D_ARRAY:
> +      slices = image->Depth;
> +      break;
> +   case GL_TEXTURE_1D_ARRAY:
> +      slices = image->Height;
> +      break;
> +   default:
> +      slices = 1;
> +   }
> +   assert(!intel_image->base.ImageOffsets);
> +   intel_image->base.ImageOffsets = malloc(slices * sizeof(GLuint));

This (and the corresponding code in the other drivers) should live in
swrast with the IsPowerOfTwo and *Scale setup I think.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20111012/23beef85/attachment.pgp>


More information about the mesa-dev mailing list