mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-28 02:10:37 +02:00
radv: reserve space for shadowed regs
Tested on RDNA2, hopefully the space reservation is large enough for
other chips as well.
Fixes: 7893040f80 ("radv: Add stricter space checks.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23672>
This commit is contained in:
parent
a5cdc4840d
commit
795bf984c6
1 changed files with 5 additions and 0 deletions
|
|
@ -46,6 +46,8 @@ radv_create_shadow_regs_preamble(const struct radv_device *device, struct radv_q
|
|||
if (!cs)
|
||||
return VK_ERROR_OUT_OF_HOST_MEMORY;
|
||||
|
||||
radeon_check_space(ws, cs, 256);
|
||||
|
||||
/* allocate memory for queue_state->shadowed_regs where register states are saved */
|
||||
result = ws->buffer_create(ws, SI_SHADOWED_REG_BUFFER_SIZE, 4096, RADEON_DOMAIN_VRAM,
|
||||
RADEON_FLAG_ZERO_VRAM | RADEON_FLAG_NO_INTERPROCESS_SHARING, RADV_BO_PRIORITY_SCRATCH, 0,
|
||||
|
|
@ -132,6 +134,9 @@ radv_init_shadowed_regs_buffer_state(const struct radv_device *device, struct ra
|
|||
cs = ws->cs_create(ws, AMD_IP_GFX, false);
|
||||
if (!cs)
|
||||
return VK_ERROR_OUT_OF_HOST_MEMORY;
|
||||
|
||||
radeon_check_space(ws, cs, 768);
|
||||
|
||||
radv_emit_shadow_regs_preamble(cs, device, &queue->state);
|
||||
ac_emulate_clear_state(info, cs, radv_set_context_reg_array);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue