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/drivers/dri/unichrome/via_tex.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/mesa/drivers/dri/unichrome/via_tex.c') diff --git a/src/mesa/drivers/dri/unichrome/via_tex.c b/src/mesa/drivers/dri/unichrome/via_tex.c index 0cbecd4146..b344c00931 100644 --- a/src/mesa/drivers/dri/unichrome/via_tex.c +++ b/src/mesa/drivers/dri/unichrome/via_tex.c @@ -787,7 +787,7 @@ static void viaTexImage(GLcontext *ctx, return; } else { - GLint dstRowStride, dstImageStride = 0; + GLint dstRowStride; GLboolean success; if (texImage->IsCompressed) { dstRowStride = _mesa_compressed_row_stride(texImage->TexFormat->MesaFormat, width); @@ -801,7 +801,8 @@ static void viaTexImage(GLcontext *ctx, texImage->TexFormat, texImage->Data, 0, 0, 0, /* dstX/Y/Zoffset */ - dstRowStride, dstImageStride, + dstRowStride, + texImage->ImageOffsets, width, height, 1, format, type, pixels, packing); if (!success) { -- cgit v1.2.3