summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/mipmap.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2015-07-21 18:35:38 -0600
committerBrian Paul <[email protected]>2015-07-21 18:35:38 -0600
commite693fc299f1f78502b9201f1e1e8f333566c9fb6 (patch)
tree07139006583e68e73a2c6dbce2e44d83f444cca0 /src/mesa/main/mipmap.c
parent096371879098c315bc054b6fe1ef6f4b8f18554f (diff)
mesa: replace Driver.GetTexImage with GetTexSubImage()
The new driver hook has x/y/zoffset and width/height/depth parameters for the new glGetTextureSubImage() function. The meta code and gallium state tracker are updated to handle the new parameters. Callers to Driver.GetTexSubImage() pass in offsets=0 and sizes equal to the whole texture size. v2: update i965 driver code, s/GLint/GLsizei/ in GetTexSubImage hook Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/mesa/main/mipmap.c')
-rw-r--r--src/mesa/main/mipmap.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
index 7732d09b2ec..1e22f930092 100644
--- a/src/mesa/main/mipmap.c
+++ b/src/mesa/main/mipmap.c
@@ -2077,9 +2077,12 @@ generate_mipmap_compressed(struct gl_context *ctx, GLenum target,
/* Get the uncompressed image */
assert(srcImage->Level == texObj->BaseLevel);
- ctx->Driver.GetTexImage(ctx,
- temp_base_format, temp_datatype,
- temp_src, srcImage);
+ ctx->Driver.GetTexSubImage(ctx,
+ 0, 0, 0,
+ srcImage->Width, srcImage->Height,
+ srcImage->Depth,
+ temp_base_format, temp_datatype,
+ temp_src, srcImage);
/* restore packing mode */
ctx->Pack = save;
}