summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChris Forbes <[email protected]>2014-01-20 20:19:35 +1300
committerChris Forbes <[email protected]>2014-04-10 18:27:41 +1200
commit5de52541e52d0a14d70ef7472d08cdc650d4a222 (patch)
treef00683baeb51f2cd12ea02766c5169819a22f684 /src
parentba3499ba01135c54d9b28a4bae916845cdbb64b7 (diff)
i965: Account for MinLevel in texture upload fast path
Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/intel_tex_subimage.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_tex_subimage.c b/src/mesa/drivers/dri/i965/intel_tex_subimage.c
index 7143ab79688..287b27b02a1 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_subimage.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_subimage.c
@@ -634,9 +634,11 @@ intel_texsubimage_tiled_memcpy(struct gl_context * ctx,
packing->Alignment, packing->RowLength, packing->SkipPixels,
packing->SkipRows, for_glTexImage);
+ int level = texImage->Level + texImage->TexObject->MinLevel;
+
/* Adjust x and y offset based on miplevel */
- xoffset += image->mt->level[texImage->Level].level_x;
- yoffset += image->mt->level[texImage->Level].level_y;
+ xoffset += image->mt->level[level].level_x;
+ yoffset += image->mt->level[level].level_y;
linear_to_tiled(
xoffset * cpp, (xoffset + width) * cpp,