i965: Fix relocation delta for WM surfaces.
authorEric Anholt <eric@anholt.net>
Wed, 9 Sep 2009 19:35:30 +0000 (12:35 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 10 Sep 2009 18:22:56 +0000 (11:22 -0700)
This was a regression in 0f328c90dbc893e15005f2ab441d309c1c176245.

Bug #23688
Bug #23254
(cherry picked from commit 5604b27b9326ac542069a49ed9650c4b0d3e939a)

src/mesa/drivers/dri/i965/brw_wm_surface_state.c

index 096f74394eb6db3365eb5d939f7b60d1895886e6..3dcc592bde501d89526bd576d805b54f3f0dbeca 100644 (file)
@@ -629,7 +629,7 @@ brw_update_renderbuffer_surface(struct brw_context *brw,
         drm_intel_bo_emit_reloc(brw->wm.surf_bo[unit],
                                 offsetof(struct brw_surface_state, ss1),
                                 region_bo,
-                                surf.ss1.base_addr,
+                                surf.ss1.base_addr - region_bo->offset,
                                 I915_GEM_DOMAIN_RENDER,
                                 I915_GEM_DOMAIN_RENDER);
       }