[Mesa-dev] [PATCH 08/15] i965: Account for MinLevel in texture upload fast path
Chris Forbes
chrisf at ijw.co.nz
Tue Jan 21 02:34:24 PST 2014
Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
src/mesa/drivers/dri/i965/intel_tex_subimage.c | 6 ++++--
1 file 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 a5ce507..93cdc75 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_subimage.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_subimage.c
@@ -640,9 +640,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,
--
1.8.5.3
More information about the mesa-dev
mailing list