diff options
author | Eric Anholt <eric@anholt.net> | 2010-06-11 00:09:14 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-06-11 00:16:15 -0700 |
commit | 27bc2de5461c1d66c8e005b35de77e7b9e214754 (patch) | |
tree | 760e7a257138259a4df380fd3579f4b13bd6bd9d /src/mesa/drivers/dri/i965/brw_wm_surface_state.c | |
parent | 8ad3fdc9678866b40f3d9faaaf7c6333d388907f (diff) |
i965: Use the state base address to avoid relocations.
This makes the binding table code simpler, and is required for gen6,
which requires binding table addresses to be under 64k offset from the
surface state base addr.
No significant change in performance on firefox-talos-gfx.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_wm_surface_state.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index 7e683bd542..05aa9233dc 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -655,7 +655,7 @@ const struct brw_tracked_state brw_wm_surfaces = { .mesa = (_NEW_COLOR | _NEW_TEXTURE | _NEW_BUFFERS), - .brw = (BRW_NEW_CONTEXT), + .brw = (BRW_NEW_BATCH), .cache = 0 }, .prepare = prepare_wm_surfaces, @@ -680,12 +680,9 @@ brw_wm_upload_binding_table(struct brw_context *brw) for (i = 0; i < BRW_WM_MAX_SURF; i++) { /* BRW_NEW_WM_SURFACES */ + bind[i] = brw->wm.surf_offset[i]; if (brw->wm.surf_bo[i]) { - drm_intel_bo_emit_reloc(brw->wm.bind_bo, - brw->wm.bind_bo_offset + i * sizeof(uint32_t), - brw->wm.surf_bo[i], brw->wm.surf_offset[i], - I915_GEM_DOMAIN_INSTRUCTION, 0); - bind[i] = brw->wm.surf_bo[i]->offset + brw->wm.surf_offset[i]; + bind[i] = brw->wm.surf_offset[i]; } else { bind[i] = 0; } |