diff options
author | Brian Paul <[email protected]> | 2011-10-04 18:26:39 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-10-05 21:06:47 -0600 |
commit | 5253cf98057dad54e25b4b8c36f8cf24f559314c (patch) | |
tree | e3eae8ee98685f9a1795e3d301680e96871d651a /src/mesa/state_tracker | |
parent | c3ef232315a4e9c18b3d812dbb28ffac6830d6f8 (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/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_cb_drawpixels.c | 4 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_texture.c | 9 |
2 files changed, 4 insertions, 9 deletions
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index 390c518699f..74e87f0e446 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -494,7 +494,6 @@ make_texture(struct st_context *st, { struct pipe_transfer *transfer; - static const GLuint dstImageOffsets = 0; GLboolean success; GLubyte *dest; const GLbitfield imageTransferStateSave = ctx->_ImageTransferState; @@ -517,10 +516,9 @@ make_texture(struct st_context *st, success = _mesa_texstore(ctx, 2, /* dims */ baseInternalFormat, /* baseInternalFormat */ mformat, /* gl_format */ - dest, /* dest */ 0, 0, 0, /* dstX/Y/Zoffset */ transfer->stride, /* dstRowStride, bytes */ - &dstImageOffsets, /* dstImageOffsets */ + &dest, /* destSlices */ width, height, 1, /* size */ format, type, /* src format/type */ pixels, /* data source */ diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 76bf78bbf0d..76574feffc0 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -803,10 +803,9 @@ st_TexImage(struct gl_context * ctx, if (!_mesa_texstore(ctx, dims, texImage->_BaseFormat, texImage->TexFormat, - texImage->Data, 0, 0, 0, /* dstX/Y/Zoffset */ dstRowStride, - texImage->ImageOffsets, + (GLubyte **) &texImage->Data, /* dstSlice */ width, height, 1, format, type, src, unpack)) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage"); @@ -1091,10 +1090,9 @@ st_TexSubimage(struct gl_context *ctx, GLint dims, GLenum target, GLint level, for (i = 0; i < depth; i++) { if (!_mesa_texstore(ctx, dims, texImage->_BaseFormat, texImage->TexFormat, - texImage->Data, 0, 0, 0, dstRowStride, - texImage->ImageOffsets, + (GLubyte **) &texImage->Data, width, height, 1, format, type, src, packing)) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexSubImage"); @@ -1356,10 +1354,9 @@ fallback_copy_texsubimage(struct gl_context *ctx, GLenum target, GLint level, _mesa_texstore(ctx, dims, texImage->_BaseFormat, texImage->TexFormat, - texDest, 0, 0, 0, dstRowStride, - texImage->ImageOffsets, + (GLubyte **) &texDest, width, height, 1, GL_RGBA, GL_FLOAT, tempSrc, /* src */ &unpack); |