[Mesa-dev] [PATCH 1/3] mesa: get rid of imageOffsets arrays in texstore code

Eric Anholt eric at anholt.net
Wed Oct 5 11:33:50 PDT 2011


On Tue,  4 Oct 2011 18:30:33 -0600, Brian Paul <brian.e.paul at gmail.com> wrote:
> From: Brian Paul <brianp at vmware.com>
> 
> These were used to find the start of a 3D image slice (or 2D array texture
> slice) given a base address.  Instead, use a simple array of address of
> image slices instead.
> 
> This is a step toward getting rid of the gl_texture_image::ImageOffsets
> field.

Nice.  While I admit my eyes glazed over for a large hunk of the
texstore.c changes, I'll still say:

Reviewed-by: Eric Anholt <eric at anholt.net>

except for one little note:

> diff --git a/src/mesa/main/texstore.h b/src/mesa/main/texstore.h
> index 24a254a..cfd3bea 100644
> --- a/src/mesa/main/texstore.h
> +++ b/src/mesa/main/texstore.h
> @@ -45,9 +45,9 @@
>   * \param dims  either 1 or 2 or 3
>   * \param baseInternalFormat  user-specified base internal format
>   * \param dstFormat  destination Mesa texture format
> - * \param dstAddr  destination image address
>   * \param dstX/Y/Zoffset  destination x/y/z offset (ala TexSubImage), in texels
>   * \param dstRowStride  destination image row stride, in bytes
> + * \param dstSlices  array of addresses of image slices (for 3D, array texture)
>   * \param dstImageOffsets  offset of each 2D slice within 3D texture, in texels
>   * \param srcWidth/Height/Depth  source image size, in pixels
>   * \param srcFormat  incoming image format

Drop dstImageOffsets docs?

> @@ -59,9 +59,9 @@
>  	struct gl_context *ctx, GLuint dims, \
>  	GLenum baseInternalFormat, \
>  	gl_format dstFormat, \
> -	GLvoid *dstAddr, \
>  	GLint dstXoffset, GLint dstYoffset, GLint dstZoffset, \
> -	GLint dstRowStride, const GLuint *dstImageOffsets, \
> +        GLint dstRowStride, \
> +        GLubyte **dstSlices, \
>  	GLint srcWidth, GLint srcHeight, GLint srcDepth, \
>  	GLenum srcFormat, GLenum srcType, \
>  	const GLvoid *srcAddr, \

-------------- 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/20111005/5aa342b3/attachment-0001.pgp>


More information about the mesa-dev mailing list