summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/intel/intel_fbo.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2009-10-23 14:19:52 -0700
committerEric Anholt <[email protected]>2009-10-23 15:21:05 -0700
commit49d402e275cdaf46de8db5a475dfe00509141195 (patch)
treee5d17e8b69c1c0c8e96b43b70d8fcb09d077c942 /src/mesa/drivers/dri/intel/intel_fbo.c
parentbfd51dc34d45ba584683c70b1f854a513d9104d3 (diff)
parent2d17dbfb5346b6d75e87c839148cbe125bf5cd6d (diff)
Merge remote branch 'origin/mesa_7_6_branch'
Conflicts: src/mesa/drivers/dri/intel/intel_fbo.c src/mesa/drivers/dri/intel/intel_mipmap_tree.c src/mesa/drivers/dri/intel/intel_mipmap_tree.h src/mesa/drivers/dri/intel/intel_tex_copy.c src/mesa/drivers/dri/intel/intel_tex_image.c
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_fbo.c')
-rw-r--r--src/mesa/drivers/dri/intel/intel_fbo.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index 2e613718051..a0ceec6f7e1 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -571,7 +571,7 @@ intel_render_texture(GLcontext * ctx,
= att->Texture->Image[att->CubeMapFace][att->TextureLevel];
struct intel_renderbuffer *irb = intel_renderbuffer(att->Renderbuffer);
struct intel_texture_image *intel_image;
- GLuint imageOffset;
+ GLuint dst_x, dst_y;
(void) fb;
@@ -618,11 +618,16 @@ intel_render_texture(GLcontext * ctx,
}
/* compute offset of the particular 2D image within the texture region */
- imageOffset = intel_miptree_image_offset(intel_image->mt, att->CubeMapFace,
- att->TextureLevel, att->Zoffset);
-
- /* store that offset in the region */
- intel_image->mt->region->draw_offset = imageOffset;
+ intel_miptree_get_image_offset(intel_image->mt,
+ att->TextureLevel,
+ att->CubeMapFace,
+ att->Zoffset,
+ &dst_x, &dst_y);
+
+ intel_image->mt->region->draw_offset = (dst_y * intel_image->mt->pitch +
+ dst_x) * intel_image->mt->cpp;
+ intel_image->mt->region->draw_x = dst_x;
+ intel_image->mt->region->draw_y = dst_y;
/* update drawing region, etc */
intel_draw_buffer(ctx, fb);