mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-18 11:53:00 +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:
@@ -63,7 +63,7 @@ static inline void
|
||||
intel_batchbuffer_require_space(struct intel_batchbuffer *batch,
|
||||
unsigned int sz)
|
||||
{
|
||||
assert(sz < BATCH_SZ - 8);
|
||||
assert(sz < BATCH_SZ - BATCH_RESERVED);
|
||||
if (intel_batchbuffer_space(batch) < sz)
|
||||
intel_batchbuffer_flush(batch);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user