diff options
author | Eric Anholt <[email protected]> | 2011-08-30 16:58:03 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2011-09-06 18:01:54 -0700 |
commit | 838bfe0c46969c359be8f5d02e2b41bb7ff044e1 (patch) | |
tree | 8ef2838f6ab1ff09bf89db7690a25589be186841 /src/mesa/drivers | |
parent | ddf8e602a774ecfd1b660e398dd9bf763d86a074 (diff) |
i965/vs: Fix setup of scratch space pointer on pre-gen6.
We were failing to relocate, so on the first draw run our scratch
would tend to get written to 0x0.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vs_state.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vs_state.c b/src/mesa/drivers/dri/i965/brw_vs_state.c index 29b3e47ab0c..a01b614ffff 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_state.c +++ b/src/mesa/drivers/dri/i965/brw_vs_state.c @@ -157,6 +157,16 @@ brw_prepare_vs_unit(struct brw_context *brw) */ vs->vs6.vs_enable = 1; + /* Emit scratch space relocation */ + if (brw->vs.prog_data->total_scratch != 0) { + drm_intel_bo_emit_reloc(intel->batch.bo, + brw->vs.state_offset + + offsetof(struct brw_vs_unit_state, thread2), + brw->vs.scratch_bo, + vs->thread2.per_thread_scratch_space, + I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER); + } + brw->state.dirty.cache |= CACHE_NEW_VS_UNIT; } |