summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texcompress_s3tc.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-10-04 18:26:39 -0600
committerBrian Paul <[email protected]>2011-10-05 21:06:47 -0600
commit5253cf98057dad54e25b4b8c36f8cf24f559314c (patch)
treee3eae8ee98685f9a1795e3d301680e96871d651a /src/mesa/main/texcompress_s3tc.c
parentc3ef232315a4e9c18b3d812dbb28ffac6830d6f8 (diff)
mesa: get rid of imageOffsets arrays in texstore code
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. Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main/texcompress_s3tc.c')
-rw-r--r--src/mesa/main/texcompress_s3tc.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/mesa/main/texcompress_s3tc.c b/src/mesa/main/texcompress_s3tc.c
index 8c6b1dfadc1..b180c80f0fb 100644
--- a/src/mesa/main/texcompress_s3tc.c
+++ b/src/mesa/main/texcompress_s3tc.c
@@ -174,7 +174,6 @@ _mesa_texstore_rgb_dxt1(TEXSTORE_PARAMS)
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset % 4 == 0);
(void) dstZoffset;
- (void) dstImageOffsets;
if (srcFormat != GL_RGB ||
srcType != GL_UNSIGNED_BYTE ||
@@ -198,7 +197,7 @@ _mesa_texstore_rgb_dxt1(TEXSTORE_PARAMS)
dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
dstFormat,
- texWidth, (GLubyte *) dstAddr);
+ texWidth, dstSlices[0]);
if (ext_tx_compress_dxtn) {
(*ext_tx_compress_dxtn)(3, srcWidth, srcHeight, pixels,
@@ -233,7 +232,6 @@ _mesa_texstore_rgba_dxt1(TEXSTORE_PARAMS)
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset % 4 == 0);
(void) dstZoffset;
- (void) dstImageOffsets;
if (srcFormat != GL_RGBA ||
srcType != GL_UNSIGNED_BYTE ||
@@ -257,7 +255,7 @@ _mesa_texstore_rgba_dxt1(TEXSTORE_PARAMS)
dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
dstFormat,
- texWidth, (GLubyte *) dstAddr);
+ texWidth, dstSlices[0]);
if (ext_tx_compress_dxtn) {
(*ext_tx_compress_dxtn)(4, srcWidth, srcHeight, pixels,
GL_COMPRESSED_RGBA_S3TC_DXT1_EXT,
@@ -291,7 +289,6 @@ _mesa_texstore_rgba_dxt3(TEXSTORE_PARAMS)
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset % 4 == 0);
(void) dstZoffset;
- (void) dstImageOffsets;
if (srcFormat != GL_RGBA ||
srcType != GL_UNSIGNED_BYTE ||
@@ -314,7 +311,7 @@ _mesa_texstore_rgba_dxt3(TEXSTORE_PARAMS)
dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
dstFormat,
- texWidth, (GLubyte *) dstAddr);
+ texWidth, dstSlices[0]);
if (ext_tx_compress_dxtn) {
(*ext_tx_compress_dxtn)(4, srcWidth, srcHeight, pixels,
GL_COMPRESSED_RGBA_S3TC_DXT3_EXT,
@@ -348,7 +345,6 @@ _mesa_texstore_rgba_dxt5(TEXSTORE_PARAMS)
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset % 4 == 0);
(void) dstZoffset;
- (void) dstImageOffsets;
if (srcFormat != GL_RGBA ||
srcType != GL_UNSIGNED_BYTE ||
@@ -371,7 +367,7 @@ _mesa_texstore_rgba_dxt5(TEXSTORE_PARAMS)
dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
dstFormat,
- texWidth, (GLubyte *) dstAddr);
+ texWidth, dstSlices[0]);
if (ext_tx_compress_dxtn) {
(*ext_tx_compress_dxtn)(4, srcWidth, srcHeight, pixels,
GL_COMPRESSED_RGBA_S3TC_DXT5_EXT,