summaryrefslogtreecommitdiff
path: root/src/mesa/main/texcompress_fxt1.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-05-20 16:19:48 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-05-20 16:19:48 +0000
commitb0b6d1abe5c7e629baebd4bf3d3ee3b17ba6ff08 (patch)
treeebac2d5b8cf7d29a38beb6bc7854b5f67a8b9524 /src/mesa/main/texcompress_fxt1.c
parent226d0187b530482684f3a0dddd0934bd015eb986 (diff)
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.
Diffstat (limited to 'src/mesa/main/texcompress_fxt1.c')
-rw-r--r--src/mesa/main/texcompress_fxt1.c10
1 files changed, 6 insertions, 4 deletions
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 ||