summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_subimage.c1
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_texture.c4
-rw-r--r--src/mesa/main/texcompress_fxt1.c18
-rw-r--r--src/mesa/main/texcompress_rgtc.c37
-rw-r--r--src/mesa/main/texcompress_s3tc.c39
-rw-r--r--src/mesa/main/texstore.c317
-rw-r--r--src/mesa/main/texstore.h1
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c1
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c2
9 files changed, 111 insertions, 309 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex_subimage.c b/src/mesa/drivers/dri/intel/intel_tex_subimage.c
index 258c3f5d6d9..eb8b9839a2b 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_subimage.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_subimage.c
@@ -118,7 +118,6 @@ intel_blit_texsubimage(struct gl_context * ctx,
if (!_mesa_texstore(ctx, 2, texImage->_BaseFormat,
texImage->TexFormat,
- 0, 0, 0, /* x, y, z offset in dest buffer */
dstRowStride,
&dstMap,
width, height, 1,
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
index 0fb80ffd9cd..ae1ea37d845 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_texture.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
@@ -480,7 +480,7 @@ nouveau_teximage(struct gl_context *ctx, GLint dims,
ret = _mesa_texstore(ctx, dims, ti->_BaseFormat,
ti->TexFormat,
- 0, 0, 0, s->pitch,
+ s->pitch,
&nti->base.Data,
width, height, depth,
format, type, pixels, packing);
@@ -564,7 +564,7 @@ nouveau_texsubimage(struct gl_context *ctx, GLint dims,
xoffset, yoffset, width, height);
ret = _mesa_texstore(ctx, 3, ti->_BaseFormat, ti->TexFormat,
- 0, 0, 0, s->pitch,
+ s->pitch,
&nti->base.Data,
width, height, depth,
format, type, pixels, packing);
diff --git a/src/mesa/main/texcompress_fxt1.c b/src/mesa/main/texcompress_fxt1.c
index d5c73e3b424..2480ffb38c3 100644
--- a/src/mesa/main/texcompress_fxt1.c
+++ b/src/mesa/main/texcompress_fxt1.c
@@ -64,14 +64,9 @@ _mesa_texstore_rgb_fxt1(TEXSTORE_PARAMS)
const GLubyte *pixels;
GLint srcRowStride;
GLubyte *dst;
- const GLint texWidth = dstRowStride * 8 / 16; /* a bit of a hack */
const GLubyte *tempImage = NULL;
ASSERT(dstFormat == MESA_FORMAT_RGB_FXT1);
- ASSERT(dstXoffset % 8 == 0);
- ASSERT(dstYoffset % 4 == 0);
- ASSERT(dstZoffset == 0);
- (void) dstZoffset;
if (srcFormat != GL_RGB ||
srcType != GL_UNSIGNED_BYTE ||
@@ -99,9 +94,7 @@ _mesa_texstore_rgb_fxt1(TEXSTORE_PARAMS)
srcType) / sizeof(GLubyte);
}
- dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
- dstFormat,
- texWidth, dstSlices[0]);
+ dst = dstSlices[0];
fxt1_encode(srcWidth, srcHeight, 3, pixels, srcRowStride,
dst, dstRowStride);
@@ -122,14 +115,9 @@ _mesa_texstore_rgba_fxt1(TEXSTORE_PARAMS)
const GLubyte *pixels;
GLint srcRowStride;
GLubyte *dst;
- GLint texWidth = dstRowStride * 8 / 16; /* a bit of a hack */
const GLubyte *tempImage = NULL;
ASSERT(dstFormat == MESA_FORMAT_RGBA_FXT1);
- ASSERT(dstXoffset % 8 == 0);
- ASSERT(dstYoffset % 4 == 0);
- ASSERT(dstZoffset == 0);
- (void) dstZoffset;
if (srcFormat != GL_RGBA ||
srcType != GL_UNSIGNED_BYTE ||
@@ -156,9 +144,7 @@ _mesa_texstore_rgba_fxt1(TEXSTORE_PARAMS)
srcType) / sizeof(GLubyte);
}
- dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
- dstFormat,
- texWidth, dstSlices[0]);
+ dst = dstSlices[0];
fxt1_encode(srcWidth, srcHeight, 4, pixels, srcRowStride,
dst, dstRowStride);
diff --git a/src/mesa/main/texcompress_rgtc.c b/src/mesa/main/texcompress_rgtc.c
index 3586fc39daf..b8e334b45eb 100644
--- a/src/mesa/main/texcompress_rgtc.c
+++ b/src/mesa/main/texcompress_rgtc.c
@@ -92,7 +92,6 @@ GLboolean
_mesa_texstore_red_rgtc1(TEXSTORE_PARAMS)
{
GLubyte *dst;
- const GLint texWidth = dstRowStride * 4 / 8; /* a bit of a hack */
const GLubyte *tempImage = NULL;
int i, j;
int numxpixels, numypixels;
@@ -102,11 +101,6 @@ _mesa_texstore_red_rgtc1(TEXSTORE_PARAMS)
GLint dstRowDiff;
ASSERT(dstFormat == MESA_FORMAT_RED_RGTC1 ||
dstFormat == MESA_FORMAT_L_LATC1);
- ASSERT(dstXoffset % 4 == 0);
- ASSERT(dstYoffset % 4 == 0);
- ASSERT(dstZoffset % 4 == 0);
- (void) dstZoffset;
-
tempImage = _mesa_make_temp_ubyte_image(ctx, dims,
baseInternalFormat,
@@ -117,9 +111,7 @@ _mesa_texstore_red_rgtc1(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE; /* out of memory */
- dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
- dstFormat,
- texWidth, dstSlices[0]);
+ dst = dstSlices[0];
blkaddr = dst;
dstRowDiff = dstRowStride >= (srcWidth * 2) ? dstRowStride - (((srcWidth + 3) & ~3) * 2) : 0;
@@ -147,7 +139,6 @@ GLboolean
_mesa_texstore_signed_red_rgtc1(TEXSTORE_PARAMS)
{
GLbyte *dst;
- const GLint texWidth = dstRowStride * 4 / 8; /* a bit of a hack */
const GLfloat *tempImage = NULL;
int i, j;
int numxpixels, numypixels;
@@ -157,10 +148,6 @@ _mesa_texstore_signed_red_rgtc1(TEXSTORE_PARAMS)
GLint dstRowDiff;
ASSERT(dstFormat == MESA_FORMAT_SIGNED_RED_RGTC1 ||
dstFormat == MESA_FORMAT_SIGNED_L_LATC1);
- ASSERT(dstXoffset % 4 == 0);
- ASSERT(dstYoffset % 4 == 0);
- ASSERT(dstZoffset % 4 == 0);
- (void) dstZoffset;
tempImage = _mesa_make_temp_float_image(ctx, dims,
baseInternalFormat,
@@ -171,9 +158,7 @@ _mesa_texstore_signed_red_rgtc1(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE; /* out of memory */
- dst = (GLbyte *)_mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
- dstFormat,
- texWidth, dstSlices[0]);
+ dst = (GLbyte *) dstSlices[0];
blkaddr = dst;
dstRowDiff = dstRowStride >= (srcWidth * 2) ? dstRowStride - (((srcWidth + 3) & ~3) * 2) : 0;
@@ -201,7 +186,6 @@ GLboolean
_mesa_texstore_rg_rgtc2(TEXSTORE_PARAMS)
{
GLubyte *dst;
- const GLint texWidth = dstRowStride * 4 / 16; /* a bit of a hack */
const GLubyte *tempImage = NULL;
int i, j;
int numxpixels, numypixels;
@@ -212,10 +196,6 @@ _mesa_texstore_rg_rgtc2(TEXSTORE_PARAMS)
ASSERT(dstFormat == MESA_FORMAT_RG_RGTC2 ||
dstFormat == MESA_FORMAT_LA_LATC2);
- ASSERT(dstXoffset % 4 == 0);
- ASSERT(dstYoffset % 4 == 0);
- ASSERT(dstZoffset % 4 == 0);
- (void) dstZoffset;
tempImage = _mesa_make_temp_ubyte_image(ctx, dims,
baseInternalFormat,
@@ -226,9 +206,7 @@ _mesa_texstore_rg_rgtc2(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE; /* out of memory */
- dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
- dstFormat,
- texWidth, dstSlices[0]);
+ dst = dstSlices[0];
blkaddr = dst;
dstRowDiff = dstRowStride >= (srcWidth * 4) ? dstRowStride - (((srcWidth + 3) & ~3) * 4) : 0;
@@ -262,7 +240,6 @@ GLboolean
_mesa_texstore_signed_rg_rgtc2(TEXSTORE_PARAMS)
{
GLbyte *dst;
- const GLint texWidth = dstRowStride * 4 / 16; /* a bit of a hack */
const GLfloat *tempImage = NULL;
int i, j;
int numxpixels, numypixels;
@@ -273,10 +250,6 @@ _mesa_texstore_signed_rg_rgtc2(TEXSTORE_PARAMS)
ASSERT(dstFormat == MESA_FORMAT_SIGNED_RG_RGTC2 ||
dstFormat == MESA_FORMAT_SIGNED_LA_LATC2);
- ASSERT(dstXoffset % 4 == 0);
- ASSERT(dstYoffset % 4 == 0);
- ASSERT(dstZoffset % 4 == 0);
- (void) dstZoffset;
tempImage = _mesa_make_temp_float_image(ctx, dims,
baseInternalFormat,
@@ -287,9 +260,7 @@ _mesa_texstore_signed_rg_rgtc2(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE; /* out of memory */
- dst = (GLbyte *)_mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
- dstFormat,
- texWidth, dstSlices[0]);
+ dst = (GLbyte *) dstSlices[0];
blkaddr = dst;
dstRowDiff = dstRowStride >= (srcWidth * 4) ? dstRowStride - (((srcWidth + 3) & ~3) * 4) : 0;
diff --git a/src/mesa/main/texcompress_s3tc.c b/src/mesa/main/texcompress_s3tc.c
index ed7eae4f46d..995e079fd89 100644
--- a/src/mesa/main/texcompress_s3tc.c
+++ b/src/mesa/main/texcompress_s3tc.c
@@ -165,15 +165,10 @@ _mesa_texstore_rgb_dxt1(TEXSTORE_PARAMS)
{
const GLubyte *pixels;
GLubyte *dst;
- const GLint texWidth = dstRowStride * 4 / 8; /* a bit of a hack */
const GLubyte *tempImage = NULL;
ASSERT(dstFormat == MESA_FORMAT_RGB_DXT1 ||
dstFormat == MESA_FORMAT_SRGB_DXT1);
- ASSERT(dstXoffset % 4 == 0);
- ASSERT(dstYoffset % 4 == 0);
- ASSERT(dstZoffset % 4 == 0);
- (void) dstZoffset;
if (srcFormat != GL_RGB ||
srcType != GL_UNSIGNED_BYTE ||
@@ -197,9 +192,7 @@ _mesa_texstore_rgb_dxt1(TEXSTORE_PARAMS)
srcFormat, srcType, 0, 0);
}
- dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
- dstFormat,
- texWidth, dstSlices[0]);
+ dst = dstSlices[0];
if (ext_tx_compress_dxtn) {
(*ext_tx_compress_dxtn)(3, srcWidth, srcHeight, pixels,
@@ -225,15 +218,10 @@ _mesa_texstore_rgba_dxt1(TEXSTORE_PARAMS)
{
const GLubyte *pixels;
GLubyte *dst;
- const GLint texWidth = dstRowStride * 4 / 8; /* a bit of a hack */
const GLubyte *tempImage = NULL;
ASSERT(dstFormat == MESA_FORMAT_RGBA_DXT1 ||
dstFormat == MESA_FORMAT_SRGBA_DXT1);
- ASSERT(dstXoffset % 4 == 0);
- ASSERT(dstYoffset % 4 == 0);
- ASSERT(dstZoffset % 4 == 0);
- (void) dstZoffset;
if (srcFormat != GL_RGBA ||
srcType != GL_UNSIGNED_BYTE ||
@@ -257,9 +245,8 @@ _mesa_texstore_rgba_dxt1(TEXSTORE_PARAMS)
srcFormat, srcType, 0, 0);
}
- dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
- dstFormat,
- texWidth, dstSlices[0]);
+ dst = dstSlices[0];
+
if (ext_tx_compress_dxtn) {
(*ext_tx_compress_dxtn)(4, srcWidth, srcHeight, pixels,
GL_COMPRESSED_RGBA_S3TC_DXT1_EXT,
@@ -284,15 +271,10 @@ _mesa_texstore_rgba_dxt3(TEXSTORE_PARAMS)
{
const GLubyte *pixels;
GLubyte *dst;
- const GLint texWidth = dstRowStride * 4 / 16; /* a bit of a hack */
const GLubyte *tempImage = NULL;
ASSERT(dstFormat == MESA_FORMAT_RGBA_DXT3 ||
dstFormat == MESA_FORMAT_SRGBA_DXT3);
- ASSERT(dstXoffset % 4 == 0);
- ASSERT(dstYoffset % 4 == 0);
- ASSERT(dstZoffset % 4 == 0);
- (void) dstZoffset;
if (srcFormat != GL_RGBA ||
srcType != GL_UNSIGNED_BYTE ||
@@ -315,9 +297,8 @@ _mesa_texstore_rgba_dxt3(TEXSTORE_PARAMS)
srcFormat, srcType, 0, 0);
}
- dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
- dstFormat,
- texWidth, dstSlices[0]);
+ dst = dstSlices[0];
+
if (ext_tx_compress_dxtn) {
(*ext_tx_compress_dxtn)(4, srcWidth, srcHeight, pixels,
GL_COMPRESSED_RGBA_S3TC_DXT3_EXT,
@@ -342,15 +323,10 @@ _mesa_texstore_rgba_dxt5(TEXSTORE_PARAMS)
{
const GLubyte *pixels;
GLubyte *dst;
- const GLint texWidth = dstRowStride * 4 / 16; /* a bit of a hack */
const GLubyte *tempImage = NULL;
ASSERT(dstFormat == MESA_FORMAT_RGBA_DXT5 ||
dstFormat == MESA_FORMAT_SRGBA_DXT5);
- ASSERT(dstXoffset % 4 == 0);
- ASSERT(dstYoffset % 4 == 0);
- ASSERT(dstZoffset % 4 == 0);
- (void) dstZoffset;
if (srcFormat != GL_RGBA ||
srcType != GL_UNSIGNED_BYTE ||
@@ -373,9 +349,8 @@ _mesa_texstore_rgba_dxt5(TEXSTORE_PARAMS)
srcFormat, srcType, 0, 0);
}
- dst = _mesa_compressed_image_address(dstXoffset, dstYoffset, 0,
- dstFormat,
- texWidth, dstSlices[0]);
+ dst = dstSlices[0];
+
if (ext_tx_compress_dxtn) {
(*ext_tx_compress_dxtn)(4, srcWidth, srcHeight, pixels,
GL_COMPRESSED_RGBA_S3TC_DXT5_EXT,
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index 1625ed9ca13..bb2fe254da6 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -851,7 +851,6 @@ _mesa_swizzle_ubyte_image(struct gl_context *ctx,
const GLubyte *rgba2dst,
GLuint dstComponents,
- GLint dstXoffset, GLint dstYoffset, GLint dstZoffset,
GLint dstRowStride,
GLubyte **dstSlices,
@@ -896,9 +895,7 @@ _mesa_swizzle_ubyte_image(struct gl_context *ctx,
srcRowStride == srcWidth * srcComponents &&
dimensions < 3) {
/* 1 and 2D images only */
- GLubyte *dstImage = dstSlices[0]
- + dstYoffset * dstRowStride
- + dstXoffset * dstComponents;
+ GLubyte *dstImage = dstSlices[0];
swizzle_copy(dstImage, dstComponents, srcImage, srcComponents, map,
srcWidth * srcHeight);
}
@@ -906,9 +903,7 @@ _mesa_swizzle_ubyte_image(struct gl_context *ctx,
GLint img, row;
for (img = 0; img < srcDepth; img++) {
const GLubyte *srcRow = srcImage;
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * dstComponents;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
swizzle_copy(dstRow, dstComponents, srcRow, srcComponents, map, srcWidth);
dstRow += dstRowStride;
@@ -929,7 +924,6 @@ static void
memcpy_texture(struct gl_context *ctx,
GLuint dimensions,
gl_format dstFormat,
- GLint dstXoffset, GLint dstYoffset, GLint dstZoffset,
GLint dstRowStride,
GLubyte **dstSlices,
GLint srcWidth, GLint srcHeight, GLint srcDepth,
@@ -951,9 +945,7 @@ memcpy_texture(struct gl_context *ctx,
/* memcpy image by image */
GLint img;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstImage = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstImage = dstSlices[img];
memcpy(dstImage, srcImage, bytesPerRow * srcHeight);
srcImage += srcImageStride;
}
@@ -963,9 +955,7 @@ memcpy_texture(struct gl_context *ctx,
GLint img, row;
for (img = 0; img < srcDepth; img++) {
const GLubyte *srcRow = srcImage;
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
memcpy(dstRow, srcRow, bytesPerRow);
dstRow += dstRowStride;
@@ -1005,7 +995,7 @@ _mesa_texstore_z32(TEXSTORE_PARAMS)
srcType == dstType) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -1014,9 +1004,7 @@ _mesa_texstore_z32(TEXSTORE_PARAMS)
/* general path */
GLint img, row;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
const GLvoid *src = _mesa_image_address(dims, srcPacking,
srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, row, 0);
@@ -1038,7 +1026,6 @@ static GLboolean
_mesa_texstore_x8_z24(TEXSTORE_PARAMS)
{
const GLuint depthScale = 0xffffff;
- const GLuint texelBytes = 4;
(void) dims;
ASSERT(dstFormat == MESA_FORMAT_X8_Z24);
@@ -1047,9 +1034,7 @@ _mesa_texstore_x8_z24(TEXSTORE_PARAMS)
/* general path */
GLint img, row;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
const GLvoid *src = _mesa_image_address(dims, srcPacking,
srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, row, 0);
@@ -1071,7 +1056,6 @@ static GLboolean
_mesa_texstore_z24_x8(TEXSTORE_PARAMS)
{
const GLuint depthScale = 0xffffff;
- const GLuint texelBytes = 4;
(void) dims;
ASSERT(dstFormat == MESA_FORMAT_Z24_X8);
@@ -1080,9 +1064,7 @@ _mesa_texstore_z24_x8(TEXSTORE_PARAMS)
/* general path */
GLint img, row;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
const GLvoid *src = _mesa_image_address(dims, srcPacking,
srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, row, 0);
@@ -1121,7 +1103,7 @@ _mesa_texstore_z16(TEXSTORE_PARAMS)
srcType == GL_UNSIGNED_SHORT) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -1130,9 +1112,7 @@ _mesa_texstore_z16(TEXSTORE_PARAMS)
/* general path */
GLint img, row;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
const GLvoid *src = _mesa_image_address(dims, srcPacking,
srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, row, 0);
@@ -1169,7 +1149,7 @@ _mesa_texstore_rgb565(TEXSTORE_PARAMS)
srcType == GL_UNSIGNED_SHORT_5_6_5) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -1186,9 +1166,7 @@ _mesa_texstore_rgb565(TEXSTORE_PARAMS)
const GLubyte *src = (const GLubyte *)
_mesa_image_address(dims, srcPacking, srcAddr, srcWidth, srcHeight,
srcFormat, srcType, 0, 0, 0);
- GLubyte *dst = dstSlices[0]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dst = dstSlices[0];
GLint row, col;
for (row = 0; row < srcHeight; row++) {
const GLubyte *srcUB = (const GLubyte *) src;
@@ -1223,9 +1201,7 @@ _mesa_texstore_rgb565(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLushort *dstUS = (GLushort *) dstRow;
/* check for byteswapped format */
@@ -1281,7 +1257,7 @@ _mesa_texstore_rgba8888(TEXSTORE_PARAMS)
(srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_BYTE && littleEndian))) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -1297,7 +1273,7 @@ _mesa_texstore_rgba8888(TEXSTORE_PARAMS)
(srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_BYTE && !littleEndian))) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -1334,7 +1310,6 @@ _mesa_texstore_rgba8888(TEXSTORE_PARAMS)
srcType,
baseInternalFormat,
dstmap, 4,
- dstXoffset, dstYoffset, dstZoffset,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcAddr,
srcPacking);
@@ -1352,9 +1327,7 @@ _mesa_texstore_rgba8888(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLuint *dstUI = (GLuint *) dstRow;
if (dstFormat == MESA_FORMAT_RGBA8888 ||
@@ -1408,7 +1381,7 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
srcType == GL_UNSIGNED_INT_8_8_8_8_REV)) {
/* simple memcpy path (little endian) */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -1423,7 +1396,7 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
srcType == GL_UNSIGNED_INT_8_8_8_8)) {
/* simple memcpy path (big endian) */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -1442,9 +1415,7 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
_mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType);
GLubyte *srcRow = (GLubyte *) _mesa_image_address(dims, srcPacking,
srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, 0, 0);
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLuint *d4 = (GLuint *) dstRow;
for (col = 0; col < srcWidth; col++) {
@@ -1477,9 +1448,7 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
_mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType);
GLubyte *srcRow = (GLubyte *) _mesa_image_address(dims, srcPacking,
srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, 0, 0);
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLuint *d4 = (GLuint *) dstRow;
for (col = 0; col < srcWidth; col++) {
@@ -1529,7 +1498,6 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
srcType,
baseInternalFormat,
dstmap, 4,
- dstXoffset, dstYoffset, dstZoffset,
dstRowStride,
dstSlices,
srcWidth, srcHeight, srcDepth, srcAddr,
@@ -1548,9 +1516,7 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLuint *dstUI = (GLuint *) dstRow;
if (dstFormat == MESA_FORMAT_ARGB8888) {
@@ -1607,7 +1573,7 @@ _mesa_texstore_rgb888(TEXSTORE_PARAMS)
littleEndian) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -1623,9 +1589,7 @@ _mesa_texstore_rgb888(TEXSTORE_PARAMS)
_mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType);
GLubyte *srcRow = (GLubyte *) _mesa_image_address(dims, srcPacking,
srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, 0, 0);
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
for (col = 0; col < srcWidth; col++) {
dstRow[col * 3 + 0] = srcRow[col * 4 + BCOMP];
@@ -1656,7 +1620,6 @@ _mesa_texstore_rgb888(TEXSTORE_PARAMS)
srcType,
baseInternalFormat,
dstmap, 3,
- dstXoffset, dstYoffset, dstZoffset,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcAddr,
srcPacking);
@@ -1674,9 +1637,7 @@ _mesa_texstore_rgb888(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
#if 0
if (littleEndian) {
@@ -1730,7 +1691,7 @@ _mesa_texstore_bgr888(TEXSTORE_PARAMS)
littleEndian) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -1746,9 +1707,7 @@ _mesa_texstore_bgr888(TEXSTORE_PARAMS)
_mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType);
GLubyte *srcRow = (GLubyte *) _mesa_image_address(dims, srcPacking,
srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, 0, 0);
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
for (col = 0; col < srcWidth; col++) {
dstRow[col * 3 + 0] = srcRow[col * 4 + RCOMP];
@@ -1779,7 +1738,6 @@ _mesa_texstore_bgr888(TEXSTORE_PARAMS)
srcType,
baseInternalFormat,
dstmap, 3,
- dstXoffset, dstYoffset, dstZoffset,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcAddr,
srcPacking);
@@ -1797,9 +1755,7 @@ _mesa_texstore_bgr888(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
for (col = 0; col < srcWidth; col++) {
dstRow[col * 3 + 0] = src[RCOMP];
@@ -1834,7 +1790,7 @@ _mesa_texstore_argb4444(TEXSTORE_PARAMS)
srcType == GL_UNSIGNED_SHORT_4_4_4_4_REV) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -1852,9 +1808,7 @@ _mesa_texstore_argb4444(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLushort *dstUS = (GLushort *) dstRow;
if (dstFormat == MESA_FORMAT_ARGB4444) {
@@ -1900,7 +1854,7 @@ _mesa_texstore_rgba5551(TEXSTORE_PARAMS)
srcType == GL_UNSIGNED_SHORT_5_5_5_1) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -1918,9 +1872,7 @@ _mesa_texstore_rgba5551(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLushort *dstUS = (GLushort *) dstRow;
for (col = 0; col < srcWidth; col++) {
@@ -1956,7 +1908,7 @@ _mesa_texstore_argb1555(TEXSTORE_PARAMS)
srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -1974,9 +1926,7 @@ _mesa_texstore_argb1555(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLushort *dstUS = (GLushort *) dstRow;
if (dstFormat == MESA_FORMAT_ARGB1555) {
@@ -2023,7 +1973,7 @@ _mesa_texstore_argb2101010(TEXSTORE_PARAMS)
baseInternalFormat == GL_RGBA) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -2042,9 +1992,7 @@ _mesa_texstore_argb2101010(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
if (baseInternalFormat == GL_RGBA) {
for (row = 0; row < srcHeight; row++) {
GLuint *dstUI = (GLuint *) dstRow;
@@ -2109,9 +2057,7 @@ _mesa_texstore_unorm44(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLubyte *dstUS = (GLubyte *) dstRow;
for (col = 0; col < srcWidth; col++) {
@@ -2156,7 +2102,7 @@ _mesa_texstore_unorm88(TEXSTORE_PARAMS)
littleEndian) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -2200,7 +2146,6 @@ _mesa_texstore_unorm88(TEXSTORE_PARAMS)
srcType,
baseInternalFormat,
dstmap, 2,
- dstXoffset, dstYoffset, dstZoffset,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcAddr,
srcPacking);
@@ -2218,9 +2163,7 @@ _mesa_texstore_unorm88(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLushort *dstUS = (GLushort *) dstRow;
if (dstFormat == MESA_FORMAT_AL88 ||
@@ -2276,7 +2219,7 @@ _mesa_texstore_unorm1616(TEXSTORE_PARAMS)
littleEndian) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -2295,9 +2238,7 @@ _mesa_texstore_unorm1616(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLuint *dstUI = (GLuint *) dstRow;
if (dstFormat == MESA_FORMAT_AL1616 ||
@@ -2351,7 +2292,7 @@ _mesa_texstore_unorm16(TEXSTORE_PARAMS)
littleEndian) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -2370,9 +2311,7 @@ _mesa_texstore_unorm16(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLushort *dstUS = (GLushort *) dstRow;
for (col = 0; col < srcWidth; col++) {
@@ -2407,7 +2346,7 @@ _mesa_texstore_rgba_16(TEXSTORE_PARAMS)
srcType == GL_UNSIGNED_SHORT) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -2426,9 +2365,7 @@ _mesa_texstore_rgba_16(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLushort *dstUS = (GLushort *) dstRow;
for (col = 0; col < srcWidth; col++) {
@@ -2456,7 +2393,6 @@ _mesa_texstore_rgba_16(TEXSTORE_PARAMS)
static GLboolean
_mesa_texstore_signed_rgba_16(TEXSTORE_PARAMS)
{
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
ASSERT(dstFormat == MESA_FORMAT_SIGNED_RGB_16 ||
@@ -2470,7 +2406,7 @@ _mesa_texstore_signed_rgba_16(TEXSTORE_PARAMS)
srcType == GL_SHORT) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -2495,9 +2431,7 @@ _mesa_texstore_signed_rgba_16(TEXSTORE_PARAMS)
* 3 or 4 components/pixel here.
*/
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLshort *dstRowS = (GLshort *) dstRow;
if (dstFormat == MESA_FORMAT_SIGNED_RGBA_16) {
@@ -2546,7 +2480,7 @@ _mesa_texstore_rgb332(TEXSTORE_PARAMS)
srcFormat == GL_RGB && srcType == GL_UNSIGNED_BYTE_3_3_2) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -2564,9 +2498,7 @@ _mesa_texstore_rgb332(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
for (col = 0; col < srcWidth; col++) {
dstRow[col] = PACK_COLOR_332( src[RCOMP],
@@ -2604,7 +2536,7 @@ _mesa_texstore_unorm8(TEXSTORE_PARAMS)
srcType == GL_UNSIGNED_BYTE) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -2632,7 +2564,6 @@ _mesa_texstore_unorm8(TEXSTORE_PARAMS)
srcType,
baseInternalFormat,
dstmap, 1,
- dstXoffset, dstYoffset, dstZoffset,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcAddr,
srcPacking);
@@ -2650,9 +2581,7 @@ _mesa_texstore_unorm8(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
for (col = 0; col < srcWidth; col++) {
dstRow[col] = src[col];
@@ -2690,7 +2619,7 @@ _mesa_texstore_ycbcr(TEXSTORE_PARAMS)
/* always just memcpy since no pixel transfer ops apply */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -2703,9 +2632,7 @@ _mesa_texstore_ycbcr(TEXSTORE_PARAMS)
!littleEndian) {
GLint img, row;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
_mesa_swap2((GLushort *) dstRow, srcWidth);
dstRow += dstRowStride;
@@ -2732,7 +2659,7 @@ _mesa_texstore_dudv8(TEXSTORE_PARAMS)
littleEndian) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -2758,7 +2685,6 @@ _mesa_texstore_dudv8(TEXSTORE_PARAMS)
GL_UNSIGNED_BYTE, /* hack */
GL_LUMINANCE_ALPHA, /* hack */
dstmap, 2,
- dstXoffset, dstYoffset, dstZoffset,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcAddr,
srcPacking);
@@ -2791,9 +2717,7 @@ _mesa_texstore_dudv8(TEXSTORE_PARAMS)
}
src = tempImage;
- dst = (GLbyte *) dstSlices[0]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ dst = (GLbyte *) dstSlices[0];
for (row = 0; row < srcHeight; row++) {
memcpy(dst, src, srcWidth * texelBytes);
dst += dstRowStride;
@@ -2826,7 +2750,7 @@ _mesa_texstore_snorm8(TEXSTORE_PARAMS)
srcType == GL_BYTE) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -2845,9 +2769,7 @@ _mesa_texstore_snorm8(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLbyte *dstRow = (GLbyte *) dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLbyte *dstRow = (GLbyte *) dstSlices[img];
for (row = 0; row < srcHeight; row++) {
for (col = 0; col < srcWidth; col++) {
dstRow[col] = FLOAT_TO_BYTE_TEX(src[col]);
@@ -2883,7 +2805,7 @@ _mesa_texstore_snorm88(TEXSTORE_PARAMS)
littleEndian) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -2902,9 +2824,7 @@ _mesa_texstore_snorm88(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLbyte *dstRow = (GLbyte *) dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLbyte *dstRow = (GLbyte *) dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLbyte *dst = dstRow;
for (col = 0; col < srcWidth; col++) {
@@ -2942,7 +2862,7 @@ _mesa_texstore_snorm16(TEXSTORE_PARAMS)
littleEndian) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -2961,9 +2881,7 @@ _mesa_texstore_snorm16(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLshort *dstUS = (GLshort *) dstRow;
for (col = 0; col < srcWidth; col++) {
@@ -3002,7 +2920,7 @@ _mesa_texstore_snorm1616(TEXSTORE_PARAMS)
littleEndian) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -3021,9 +2939,7 @@ _mesa_texstore_snorm1616(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLshort *dst = (GLshort *) dstRow;
for (col = 0; col < srcWidth; col++) {
@@ -3070,9 +2986,7 @@ _mesa_texstore_signed_rgbx8888(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLbyte *dstRow = (GLbyte *) dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLbyte *dstRow = (GLbyte *) dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLbyte *dst = dstRow;
for (col = 0; col < srcWidth; col++) {
@@ -3116,7 +3030,7 @@ _mesa_texstore_signed_rgba8888(TEXSTORE_PARAMS)
(srcFormat == GL_ABGR_EXT && srcType == GL_BYTE && littleEndian))) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -3129,7 +3043,7 @@ _mesa_texstore_signed_rgba8888(TEXSTORE_PARAMS)
(srcFormat == GL_ABGR_EXT && srcType == GL_BYTE && !littleEndian))) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -3148,9 +3062,7 @@ _mesa_texstore_signed_rgba8888(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLbyte *dstRow = (GLbyte *) dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLbyte *dstRow = (GLbyte *) dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLbyte *dst = dstRow;
if (dstFormat == MESA_FORMAT_SIGNED_RGBA8888) {
@@ -3204,7 +3116,7 @@ _mesa_texstore_z24_s8(TEXSTORE_PARAMS)
!srcPacking->SwapBytes) {
/* simple path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -3213,9 +3125,7 @@ _mesa_texstore_z24_s8(TEXSTORE_PARAMS)
srcFormat == GL_STENCIL_INDEX) {
/* In case we only upload depth we need to preserve the stencil */
for (img = 0; img < srcDepth; img++) {
- GLuint *dstRow = (GLuint *) (dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * 4);
+ GLuint *dstRow = (GLuint *) dstSlices[img];
const GLubyte *src
= (const GLubyte *) _mesa_image_address(dims, srcPacking, srcAddr,
srcWidth, srcHeight,
@@ -3285,9 +3195,7 @@ _mesa_texstore_s8_z24(TEXSTORE_PARAMS)
srcType == GL_UNSIGNED_INT_24_8_EXT);
for (img = 0; img < srcDepth; img++) {
- GLuint *dstRow = (GLuint *) (dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * 4);
+ GLuint *dstRow = (GLuint *) dstSlices[img];
const GLubyte *src
= (const GLubyte *) _mesa_image_address(dims, srcPacking, srcAddr,
srcWidth, srcHeight,
@@ -3353,7 +3261,7 @@ _mesa_texstore_s8(TEXSTORE_PARAMS)
srcType == GL_UNSIGNED_BYTE) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -3364,9 +3272,7 @@ _mesa_texstore_s8(TEXSTORE_PARAMS)
GLint img, row;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride / sizeof(GLuint)
- + dstXoffset;
+ GLubyte *dstRow = dstSlices[img];
const GLubyte *src
= (const GLubyte *) _mesa_image_address(dims, srcPacking, srcAddr,
srcWidth, srcHeight,
@@ -3438,7 +3344,7 @@ _mesa_texstore_rgba_float32(TEXSTORE_PARAMS)
srcType == GL_FLOAT) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -3459,9 +3365,7 @@ _mesa_texstore_rgba_float32(TEXSTORE_PARAMS)
return GL_FALSE;
bytesPerRow = srcWidth * components * sizeof(GLfloat);
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
memcpy(dstRow, srcRow, bytesPerRow);
dstRow += dstRowStride;
@@ -3511,7 +3415,7 @@ _mesa_texstore_rgba_float16(TEXSTORE_PARAMS)
srcType == GL_HALF_FLOAT_ARB) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -3530,9 +3434,7 @@ _mesa_texstore_rgba_float16(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLhalfARB *dstTexel = (GLhalfARB *) dstRow;
GLint i;
@@ -3584,7 +3486,7 @@ _mesa_texstore_rgba_int8(TEXSTORE_PARAMS)
srcType == GL_BYTE) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -3602,9 +3504,7 @@ _mesa_texstore_rgba_int8(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLbyte *dstTexel = (GLbyte *) dstRow;
GLint i;
@@ -3656,7 +3556,7 @@ _mesa_texstore_rgba_int16(TEXSTORE_PARAMS)
srcType == GL_SHORT) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -3674,9 +3574,7 @@ _mesa_texstore_rgba_int16(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLshort *dstTexel = (GLshort *) dstRow;
GLint i;
@@ -3728,7 +3626,7 @@ _mesa_texstore_rgba_int32(TEXSTORE_PARAMS)
srcType == GL_INT) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -3746,9 +3644,7 @@ _mesa_texstore_rgba_int32(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLint *dstTexel = (GLint *) dstRow;
GLint i;
@@ -3800,7 +3696,7 @@ _mesa_texstore_rgba_uint8(TEXSTORE_PARAMS)
srcType == GL_UNSIGNED_BYTE) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -3816,9 +3712,7 @@ _mesa_texstore_rgba_uint8(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLubyte *dstTexel = (GLubyte *) dstRow;
GLint i;
@@ -3870,7 +3764,7 @@ _mesa_texstore_rgba_uint16(TEXSTORE_PARAMS)
srcType == GL_UNSIGNED_SHORT) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -3886,9 +3780,7 @@ _mesa_texstore_rgba_uint16(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLushort *dstTexel = (GLushort *) dstRow;
GLint i;
@@ -3940,7 +3832,7 @@ _mesa_texstore_rgba_uint32(TEXSTORE_PARAMS)
srcType == GL_UNSIGNED_INT) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -3956,9 +3848,7 @@ _mesa_texstore_rgba_uint32(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLuint *dstTexel = (GLuint *) dstRow;
GLint i;
@@ -3992,7 +3882,6 @@ _mesa_texstore_srgb8(TEXSTORE_PARAMS)
k = _mesa_texstore_rgb888(ctx, dims, baseInternalFormat,
newDstFormat,
- dstXoffset, dstYoffset, dstZoffset,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType,
@@ -4013,7 +3902,6 @@ _mesa_texstore_srgba8(TEXSTORE_PARAMS)
newDstFormat = MESA_FORMAT_RGBA8888;
k = _mesa_texstore_rgba8888(ctx, dims, baseInternalFormat,
newDstFormat,
- dstXoffset, dstYoffset, dstZoffset,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType,
@@ -4035,7 +3923,6 @@ _mesa_texstore_sargb8(TEXSTORE_PARAMS)
k = _mesa_texstore_argb8888(ctx, dims, baseInternalFormat,
newDstFormat,
- dstXoffset, dstYoffset, dstZoffset,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType,
@@ -4057,7 +3944,6 @@ _mesa_texstore_sl8(TEXSTORE_PARAMS)
/* _mesa_textore_a8 handles luminance8 too */
k = _mesa_texstore_unorm8(ctx, dims, baseInternalFormat,
newDstFormat,
- dstXoffset, dstYoffset, dstZoffset,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType,
@@ -4079,7 +3965,6 @@ _mesa_texstore_sla8(TEXSTORE_PARAMS)
k = _mesa_texstore_unorm88(ctx, dims, baseInternalFormat,
newDstFormat,
- dstXoffset, dstYoffset, dstZoffset,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType,
@@ -4112,7 +3997,7 @@ _mesa_texstore_rgb9_e5(TEXSTORE_PARAMS)
srcType == GL_UNSIGNED_INT_5_9_9_9_REV) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -4131,9 +4016,7 @@ _mesa_texstore_rgb9_e5(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * 4;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLuint *dstUI = (GLuint*)dstRow;
for (col = 0; col < srcWidth; col++) {
@@ -4163,7 +4046,7 @@ _mesa_texstore_r11_g11_b10f(TEXSTORE_PARAMS)
srcType == GL_UNSIGNED_INT_10F_11F_11F_REV) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -4182,9 +4065,7 @@ _mesa_texstore_r11_g11_b10f(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * 4;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLuint *dstUI = (GLuint*)dstRow;
for (col = 0; col < srcWidth; col++) {
@@ -4217,7 +4098,7 @@ _mesa_texstore_z32f_x24s8(TEXSTORE_PARAMS)
!srcPacking->SwapBytes) {
/* simple path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -4231,9 +4112,7 @@ _mesa_texstore_z32f_x24s8(TEXSTORE_PARAMS)
/* In case we only upload depth we need to preserve the stencil */
for (img = 0; img < srcDepth; img++) {
- uint64_t *dstRow = (uint64_t *) (dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * 8);
+ uint64_t *dstRow = (uint64_t *) dstSlices[img];
const uint64_t *src
= (const uint64_t *) _mesa_image_address(dims, srcPacking, srcAddr,
srcWidth, srcHeight,
@@ -4281,7 +4160,7 @@ _mesa_texstore_argb2101010_uint(TEXSTORE_PARAMS)
baseInternalFormat == GL_RGBA) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
@@ -4300,9 +4179,7 @@ _mesa_texstore_argb2101010_uint(TEXSTORE_PARAMS)
if (!tempImage)
return GL_FALSE;
for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[dstZoffset + img]
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
+ GLubyte *dstRow = dstSlices[img];
for (row = 0; row < srcHeight; row++) {
GLuint *dstUI = (GLuint *) dstRow;
@@ -4329,7 +4206,6 @@ _mesa_texstore_null(TEXSTORE_PARAMS)
(void) ctx; (void) dims;
(void) baseInternalFormat;
(void) dstFormat;
- (void) dstXoffset; (void) dstYoffset; (void) dstZoffset;
(void) dstRowStride; (void) dstSlices,
(void) srcWidth; (void) srcHeight; (void) srcDepth;
(void) srcFormat; (void) srcType;
@@ -4539,7 +4415,7 @@ _mesa_texstore(TEXSTORE_PARAMS)
storeImage = _mesa_get_texstore_func(dstFormat);
success = storeImage(ctx, dims, baseInternalFormat,
- dstFormat, dstXoffset, dstYoffset, dstZoffset,
+ dstFormat,
dstRowStride, dstSlices,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr, srcPacking);
@@ -4671,7 +4547,6 @@ store_texsubimage(struct gl_context *ctx,
*/
success = _mesa_texstore(ctx, dims, texImage->_BaseFormat,
texImage->TexFormat,
- 0, 0, 0, /* dstX/Y/Zoffset */
dstRowStride,
&dstMap,
width, height, 1, /* w, h, d */
diff --git a/src/mesa/main/texstore.h b/src/mesa/main/texstore.h
index a9d3c06b764..85e33b0fe26 100644
--- a/src/mesa/main/texstore.h
+++ b/src/mesa/main/texstore.h
@@ -58,7 +58,6 @@
struct gl_context *ctx, GLuint dims, \
GLenum baseInternalFormat, \
gl_format dstFormat, \
- GLint dstXoffset, GLint dstYoffset, GLint dstZoffset, \
GLint dstRowStride, \
GLubyte **dstSlices, \
GLint srcWidth, GLint srcHeight, GLint srcDepth, \
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index 318ba7d0628..0609a54eab0 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -517,7 +517,6 @@ make_texture(struct st_context *st,
success = _mesa_texstore(ctx, 2, /* dims */
baseInternalFormat, /* baseInternalFormat */
mformat, /* gl_format */
- 0, 0, 0, /* dstX/Y/Zoffset */
transfer->stride, /* dstRowStride, bytes */
&dest, /* destSlices */
width, height, 1, /* size */
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index cf9d068e36f..e60c309b85e 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -703,7 +703,6 @@ st_TexImage(struct gl_context * ctx,
if (!_mesa_texstore(ctx, dims,
texImage->_BaseFormat,
texImage->TexFormat,
- 0, 0, 0, /* dstX/Y/Zoffset */
dstRowStride,
(GLubyte **) &dstMap, /* dstSlice */
width, height, 1,
@@ -1105,7 +1104,6 @@ fallback_copy_texsubimage(struct gl_context *ctx, GLenum target, GLint level,
_mesa_texstore(ctx, dims,
texImage->_BaseFormat,
texImage->TexFormat,
- 0, 0, 0,
dstRowStride,
(GLubyte **) &texDest,
width, height, 1,