i965: Trim the trailing NOOP from 3DSTATE_INDEX_BUFFER
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
13bab58f04
commit
45ba7afbd1
|
@ -681,29 +681,18 @@ static void brw_emit_index_buffer(struct brw_context *brw)
|
||||||
if (index_buffer == NULL)
|
if (index_buffer == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Emit the indexbuffer packet:
|
BEGIN_BATCH(3);
|
||||||
*/
|
OUT_BATCH(CMD_INDEX_BUFFER << 16 |
|
||||||
{
|
/* cut index enable << 10 */
|
||||||
struct brw_indexbuffer ib;
|
get_index_type(index_buffer->type) << 8 |
|
||||||
|
1);
|
||||||
memset(&ib, 0, sizeof(ib));
|
OUT_RELOC(brw->ib.bo,
|
||||||
|
I915_GEM_DOMAIN_VERTEX, 0,
|
||||||
ib.header.bits.opcode = CMD_INDEX_BUFFER;
|
brw->ib.offset);
|
||||||
ib.header.bits.length = sizeof(ib)/4 - 2;
|
OUT_RELOC(brw->ib.bo,
|
||||||
ib.header.bits.index_format = get_index_type(index_buffer->type);
|
I915_GEM_DOMAIN_VERTEX, 0,
|
||||||
ib.header.bits.cut_index_enable = 0;
|
brw->ib.offset + brw->ib.size - 1);
|
||||||
|
ADVANCE_BATCH();
|
||||||
BEGIN_BATCH(4);
|
|
||||||
OUT_BATCH( ib.header.dword );
|
|
||||||
OUT_RELOC(brw->ib.bo,
|
|
||||||
I915_GEM_DOMAIN_VERTEX, 0,
|
|
||||||
brw->ib.offset);
|
|
||||||
OUT_RELOC(brw->ib.bo,
|
|
||||||
I915_GEM_DOMAIN_VERTEX, 0,
|
|
||||||
brw->ib.offset + brw->ib.size - 1);
|
|
||||||
OUT_BATCH( 0 );
|
|
||||||
ADVANCE_BATCH();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct brw_tracked_state brw_index_buffer = {
|
const struct brw_tracked_state brw_index_buffer = {
|
||||||
|
|
Loading…
Reference in New Issue