mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 12:50:10 +01:00
anv: use the device size of CS prefetch to pad secondary buffer calls
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9679>
This commit is contained in:
parent
33bc2977e5
commit
9d947127d3
1 changed files with 4 additions and 1 deletions
|
|
@ -996,10 +996,13 @@ anv_cmd_buffer_end_batch_buffer(struct anv_cmd_buffer *cmd_buffer)
|
|||
* prefetch.
|
||||
*/
|
||||
if (cmd_buffer->batch_bos.next == cmd_buffer->batch_bos.prev) {
|
||||
const struct gen_device_info *devinfo = &cmd_buffer->device->info;
|
||||
/* Careful to have everything in signed integer. */
|
||||
int32_t prefetch_len = devinfo->cs_prefetch_size;
|
||||
int32_t batch_len =
|
||||
cmd_buffer->batch.next - cmd_buffer->batch.start;
|
||||
|
||||
for (int32_t i = 0; i < (512 - batch_len); i += 4)
|
||||
for (int32_t i = 0; i < (prefetch_len - batch_len); i += 4)
|
||||
anv_batch_emit(&cmd_buffer->batch, GEN8_MI_NOOP, noop);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue