Fix double-counting of low_offset in block->virtual.
authorEric Anholt <eric@anholt.net>
Fri, 18 May 2007 19:57:34 +0000 (12:57 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 18 May 2007 19:57:34 +0000 (12:57 -0700)
src/mesa/drivers/dri/common/dri_bufmgr_fake.c

index 191e16af616d6df3691ecba9d8d3332cc03eae9f..1820da5b4459c3d22af00a76d05e909297fe6643 100644 (file)
@@ -214,7 +214,8 @@ alloc_block(dri_bo *bo)
     */
    insert_at_tail(&bufmgr_fake->lru, block);
 
-   block->virtual = bufmgr_fake->virtual + block->mem->ofs;
+   block->virtual = bufmgr_fake->virtual +
+      block->mem->ofs - bufmgr_fake->low_offset;
    block->bo = bo;
 
    bo_fake->block = block;