mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-15 02:12:59 +00:00
lib: fix gen5 workaround emission
Using BEGIN_BATCH can lead to a nice inf recursion through require_space -> flush_batch -> BEGIN_BATCH. Also fix things up to always require BATCH_RESERVED. We need 2 dwords for the gen5 workaround and 2 dwords for MI_BB_END.
This commit is contained in:
@@ -84,10 +84,11 @@ intel_batchbuffer_flush_on_ring(struct intel_batchbuffer *batch, int ring)
|
||||
return;
|
||||
|
||||
if (IS_GEN5(batch->devid)) {
|
||||
BEGIN_BATCH(2);
|
||||
OUT_BATCH(CMD_POLY_STIPPLE_OFFSET << 16);
|
||||
OUT_BATCH(0);
|
||||
ADVANCE_BATCH();
|
||||
/* emit gen5 w/a without batch space checks - we reserve that
|
||||
* already. */
|
||||
*(uint32_t *) (batch->ptr) = CMD_POLY_STIPPLE_OFFSET << 16;
|
||||
*(uint32_t *) (batch->ptr) = 0;
|
||||
batch->ptr += 8;
|
||||
}
|
||||
|
||||
/* Round batchbuffer usage to 2 DWORDs. */
|
||||
|
||||
Reference in New Issue
Block a user