From b0b6d1abe5c7e629baebd4bf3d3ee3b17ba6ff08 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 20 May 2006 16:19:48 +0000 Subject: In gl_texture_image, replace ImageStride with an ImageOffsets array. Some hardware lays out 3D mipmaps in a manner that can't be expressed with a simple image stride. The ImageOffsets array is allocated and initialized to typical defaults in the _mesa_init_teximage_fields() function. If needed, a driver will then have to replace these offsets. TexStore and TexelFetch routines updated to use offsets array. --- src/mesa/main/texcompress_fxt1.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/mesa/main/texcompress_fxt1.c') diff --git a/src/mesa/main/texcompress_fxt1.c b/src/mesa/main/texcompress_fxt1.c index a3d5db93fc..18180e12ea 100644 --- a/src/mesa/main/texcompress_fxt1.c +++ b/src/mesa/main/texcompress_fxt1.c @@ -64,7 +64,7 @@ _mesa_init_texture_fxt1( GLcontext *ctx ) * Called via TexFormat->StoreImage to store an RGB_FXT1 texture. */ static GLboolean -texstore_rgb_fxt1(STORE_PARAMS) +texstore_rgb_fxt1(TEXSTORE_PARAMS) { const GLchan *pixels; GLint srcRowStride; @@ -76,7 +76,8 @@ texstore_rgb_fxt1(STORE_PARAMS) ASSERT(dstXoffset % 8 == 0); ASSERT(dstYoffset % 4 == 0); ASSERT(dstZoffset == 0); - (void) dstZoffset; (void) dstImageStride; + (void) dstZoffset; + (void) dstImageOffsets; if (srcFormat != GL_RGB || srcType != CHAN_TYPE || @@ -120,7 +121,7 @@ texstore_rgb_fxt1(STORE_PARAMS) * Called via TexFormat->StoreImage to store an RGBA_FXT1 texture. */ static GLboolean -texstore_rgba_fxt1(STORE_PARAMS) +texstore_rgba_fxt1(TEXSTORE_PARAMS) { const GLchan *pixels; GLint srcRowStride; @@ -132,7 +133,8 @@ texstore_rgba_fxt1(STORE_PARAMS) ASSERT(dstXoffset % 8 == 0); ASSERT(dstYoffset % 4 == 0); ASSERT(dstZoffset == 0); - (void) dstZoffset; (void) dstImageStride; + (void) dstZoffset; + (void) dstImageOffsets; if (srcFormat != GL_RGBA || srcType != CHAN_TYPE || -- cgit v1.2.3