mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 22:00:11 +01:00
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 <kenneth@whitecape.org>
This commit is contained in:
parent
ddf8e602a7
commit
838bfe0c46
1 changed files with 10 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue