mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
i965g: format RELOCs similarly
This commit is contained in:
parent
23c2ba8280
commit
4ea94c04c9
3 changed files with 26 additions and 12 deletions
|
|
@ -151,8 +151,7 @@ cc_unit_create_from_key(struct brw_context *brw, struct brw_cc_unit_key *key)
|
|||
|
||||
/* Emit CC viewport relocation */
|
||||
brw->sws->bo_emit_reloc(bo,
|
||||
I915_GEM_DOMAIN_INSTRUCTION,
|
||||
0,
|
||||
I915_GEM_DOMAIN_INSTRUCTION, 0,
|
||||
0,
|
||||
offsetof(struct brw_cc_unit_state, cc4),
|
||||
brw->cc.vp_bo);
|
||||
|
|
|
|||
|
|
@ -150,8 +150,7 @@ clip_unit_create_from_key(struct brw_context *brw,
|
|||
/* Emit clip program relocation */
|
||||
assert(brw->clip.prog_bo);
|
||||
brw->sws->bo_emit_reloc(bo,
|
||||
I915_GEM_DOMAIN_INSTRUCTION,
|
||||
0,
|
||||
I915_GEM_DOMAIN_INSTRUCTION, 0,
|
||||
clip.thread0.grf_reg_count << 1,
|
||||
offsetof(struct brw_clip_unit_state, thread0),
|
||||
brw->clip.prog_bo);
|
||||
|
|
|
|||
|
|
@ -110,13 +110,17 @@ static int upload_binding_table_pointers(struct brw_context *brw)
|
|||
BEGIN_BATCH(6, IGNORE_CLIPRECTS);
|
||||
OUT_BATCH(CMD_BINDING_TABLE_PTRS << 16 | (6 - 2));
|
||||
if (brw->vs.bind_bo != NULL)
|
||||
OUT_RELOC(brw->vs.bind_bo, I915_GEM_DOMAIN_SAMPLER, 0, 0); /* vs */
|
||||
OUT_RELOC(brw->vs.bind_bo,
|
||||
I915_GEM_DOMAIN_SAMPLER, 0,
|
||||
0); /* vs */
|
||||
else
|
||||
OUT_BATCH(0);
|
||||
OUT_BATCH(0); /* gs */
|
||||
OUT_BATCH(0); /* clip */
|
||||
OUT_BATCH(0); /* sf */
|
||||
OUT_RELOC(brw->wm.bind_bo, I915_GEM_DOMAIN_SAMPLER, 0, 0); /* wm/ps */
|
||||
OUT_RELOC(brw->wm.bind_bo,
|
||||
I915_GEM_DOMAIN_SAMPLER, 0,
|
||||
0); /* wm/ps */
|
||||
ADVANCE_BATCH();
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -142,15 +146,27 @@ static int upload_pipelined_state_pointers(struct brw_context *brw )
|
|||
{
|
||||
BEGIN_BATCH(7, IGNORE_CLIPRECTS);
|
||||
OUT_BATCH(CMD_PIPELINED_STATE_POINTERS << 16 | (7 - 2));
|
||||
OUT_RELOC(brw->vs.state_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
|
||||
OUT_RELOC(brw->vs.state_bo,
|
||||
I915_GEM_DOMAIN_INSTRUCTION, 0,
|
||||
0);
|
||||
if (brw->gs.prog_active)
|
||||
OUT_RELOC(brw->gs.state_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 1);
|
||||
OUT_RELOC(brw->gs.state_bo,
|
||||
I915_GEM_DOMAIN_INSTRUCTION, 0,
|
||||
1);
|
||||
else
|
||||
OUT_BATCH(0);
|
||||
OUT_RELOC(brw->clip.state_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 1);
|
||||
OUT_RELOC(brw->sf.state_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
|
||||
OUT_RELOC(brw->wm.state_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
|
||||
OUT_RELOC(brw->cc.state_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
|
||||
OUT_RELOC(brw->clip.state_bo,
|
||||
I915_GEM_DOMAIN_INSTRUCTION, 0,
|
||||
1);
|
||||
OUT_RELOC(brw->sf.state_bo,
|
||||
I915_GEM_DOMAIN_INSTRUCTION, 0,
|
||||
0);
|
||||
OUT_RELOC(brw->wm.state_bo,
|
||||
I915_GEM_DOMAIN_INSTRUCTION, 0,
|
||||
0);
|
||||
OUT_RELOC(brw->cc.state_bo,
|
||||
I915_GEM_DOMAIN_INSTRUCTION, 0,
|
||||
0);
|
||||
ADVANCE_BATCH();
|
||||
|
||||
brw->state.dirty.brw |= BRW_NEW_PSP;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue