aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i965/brw_wm_surface_state.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2009-11-05 20:34:27 +0000
committerKeith Whitwell <[email protected]>2009-11-05 20:34:27 +0000
commit963728665aa0d48d4fdbba4276084528f221ee39 (patch)
treeb349024e54d20b1662e719287961f36fdda045c7 /src/gallium/drivers/i965/brw_wm_surface_state.c
parent658da189b62c4086c08950f3da5767e628235b55 (diff)
i965g: make the winsys responsible for all buffer->offset handling
The winsys now inserts the presumed offset into referring buffers from inside of bo_emit_reloc(). Remove the many locally coded places where this was happening in the driver and eliminate the worry of getting it wrong. No longer need to expose offset values to the driver at all, so no need to worry about what to do in the driver when they change. Just use zero values wherever we had offsets previously -- the relocations will fix it all up for us.
Diffstat (limited to 'src/gallium/drivers/i965/brw_wm_surface_state.c')
-rw-r--r--src/gallium/drivers/i965/brw_wm_surface_state.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/i965/brw_wm_surface_state.c b/src/gallium/drivers/i965/brw_wm_surface_state.c
index e5d03299677..ed365b03b92 100644
--- a/src/gallium/drivers/i965/brw_wm_surface_state.c
+++ b/src/gallium/drivers/i965/brw_wm_surface_state.c
@@ -130,7 +130,7 @@ brw_update_render_surface(struct brw_context *brw,
*/
ret = brw->sws->bo_emit_reloc(*bo_out,
BRW_USAGE_RENDER_TARGET,
- ss.ss1.base_addr - surface->bo->offset[0], /* XXX */
+ 0,
offsetof(struct brw_surface_state, ss1),
surface->bo);
if (ret)
@@ -167,8 +167,11 @@ brw_wm_get_binding_table(struct brw_context *brw,
bo_out))
return PIPE_OK;
+ /* Upload zero data, will all be overwitten with relocation
+ * offsets:
+ */
for (i = 0; i < brw->wm.nr_surfaces; i++)
- data[i] = brw->wm.surf_bo[i]->offset[0];
+ data[i] = 0;
ret = brw_upload_cache( &brw->surface_cache, BRW_SS_SURF_BIND,
NULL, 0,