summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/r200/r200_texmem.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_texmem.c b/src/mesa/drivers/dri/r200/r200_texmem.c
index b219995c3e..bc937ce6cb 100644
--- a/src/mesa/drivers/dri/r200/r200_texmem.c
+++ b/src/mesa/drivers/dri/r200/r200_texmem.c
@@ -382,6 +382,14 @@ static void uploadSubImage( r200ContextPtr rmesa, r200TexObjPtr t,
/* copy (x,y,width,height,data) */
memcpy( &tmp, &t->image[face][hwlevel], sizeof(tmp) );
+ /* Adjust the base offset to account for the Y-offset. This is done,
+ * instead of just letting the Y-offset automatically take care of it,
+ * because it is possible, for very large textures, for the Y-offset
+ * to exceede the [-8192,+8191] range.
+ */
+ tex.offset += tmp.y * 1024;
+ tmp.y = 0;
+
LOCK_HARDWARE( rmesa );
do {
ret = drmCommandWriteRead( rmesa->dri.fd, DRM_RADEON_TEXTURE,