mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 22:08:26 +02:00
radeonsi: reorder if condition in si_init_cp_reg_shadowing() function
cs_preamble_state can be created before initializing register shadowing since register shadowing failure means driver failed now. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35106>
This commit is contained in:
parent
1cb0af6308
commit
aab890644b
1 changed files with 3 additions and 5 deletions
|
|
@ -11,6 +11,9 @@
|
|||
|
||||
bool si_init_cp_reg_shadowing(struct si_context *sctx)
|
||||
{
|
||||
if (!si_init_gfx_preamble_state(sctx))
|
||||
return false;
|
||||
|
||||
if (sctx->uses_kernelq_reg_shadowing) {
|
||||
if (sctx->screen->info.has_fw_based_shadowing) {
|
||||
sctx->shadowing.registers =
|
||||
|
|
@ -45,12 +48,7 @@ bool si_init_cp_reg_shadowing(struct si_context *sctx)
|
|||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!si_init_gfx_preamble_state(sctx))
|
||||
return false;
|
||||
|
||||
if (sctx->uses_kernelq_reg_shadowing) {
|
||||
/* We need to clear the shadowed reg buffer. */
|
||||
si_cp_dma_clear_buffer(sctx, &sctx->gfx_cs, &sctx->shadowing.registers->b.b,
|
||||
0, sctx->shadowing.registers->bo_size, 0);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue