summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/intel
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/drivers/dri/intel
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/drivers/dri/intel')
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_subimage.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex_subimage.c b/src/mesa/drivers/dri/intel/intel_tex_subimage.c
index e58d906b4f2..cbbf7e1d48d 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_subimage.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_subimage.c
@@ -57,6 +57,7 @@ intel_blit_texsubimage(struct gl_context * ctx,
unsigned int blit_x = 0, blit_y = 0;
unsigned long pitch;
uint32_t tiling_mode = I915_TILING_NONE;
+ GLubyte *dstMap;
/* Try to do a blit upload of the subimage if the texture is
* currently busy.
@@ -108,8 +109,7 @@ intel_blit_texsubimage(struct gl_context * ctx,
return false;
}
- texImage->Data = temp_bo->virtual;
- texImage->ImageOffsets[0] = 0;
+ dstMap = temp_bo->virtual;
dstRowStride = pitch;
intel_miptree_get_image_offset(intelImage->mt, level,
@@ -122,10 +122,9 @@ intel_blit_texsubimage(struct gl_context * ctx,
if (!_mesa_texstore(ctx, 2, texImage->_BaseFormat,
texImage->TexFormat,
- texImage->Data,
xoffset, yoffset, 0,
dstRowStride,
- texImage->ImageOffsets,
+ &dstMap,
width, height, 1,
format, type, pixels, packing)) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "intelTexSubImage");
@@ -136,7 +135,6 @@ intel_blit_texsubimage(struct gl_context * ctx,
intelImage->mt->cpp;
drm_intel_gem_bo_unmap_gtt(temp_bo);
- texImage->Data = NULL;
ret = intelEmitCopyBlit(intel,
intelImage->mt->cpp,