mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
anv: refresh cached current batch bo after emitting some commands
Fixes crashes in: - Rise of the Tomb Rider (on benchmark start) - Total War: Three Kingdoms (on game start) - Total War: Warhammer II (on game start) Fixes:34a0ce58c7("anv: add a new execution mode for secondary command buffers") Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6546> (cherry picked from commite94c22429b)
This commit is contained in:
parent
0cf9af563b
commit
8b9213e0b7
2 changed files with 6 additions and 1 deletions
|
|
@ -3235,7 +3235,7 @@
|
|||
"description": "anv: refresh cached current batch bo after emitting some commands",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "34a0ce58c7f85ea3ec3f1026469ce06602f38a5b"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -951,6 +951,11 @@ anv_cmd_buffer_end_batch_buffer(struct anv_cmd_buffer *cmd_buffer)
|
|||
.SecondLevelBatchBuffer = Firstlevelbatch) +
|
||||
(GEN8_MI_BATCH_BUFFER_START_BatchBufferStartAddress_start / 8);
|
||||
cmd_buffer->return_addr = anv_batch_address(&cmd_buffer->batch, jump_addr);
|
||||
|
||||
/* The emit above may have caused us to chain batch buffers which
|
||||
* would mean that batch_bo is no longer valid.
|
||||
*/
|
||||
batch_bo = anv_cmd_buffer_current_batch_bo(cmd_buffer);
|
||||
} else if ((cmd_buffer->batch_bos.next == cmd_buffer->batch_bos.prev) &&
|
||||
(length < ANV_CMD_BUFFER_BATCH_SIZE / 2)) {
|
||||
/* If the secondary has exactly one batch buffer in its list *and*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue