mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
nvk: Always wait for the FALCON in set_priv_reg
The previous version had an optimization where, instead of actually
waiting on the FALCON to return, it would just do a bunch of nops in
some cases. This seems broken at least on Turing+ and results in
registers not ending up with the right values. It only really shows up
when you set two registers back-to-back in which case the second
SET_PRIV_REG may mess up the first.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27927>
(cherry picked from commit 0ed7bce8e5)
This commit is contained in:
parent
ed886a26c7
commit
8ee75c66d3
2 changed files with 7 additions and 16 deletions
|
|
@ -334,7 +334,7 @@
|
|||
"description": "nvk: Always wait for the FALCON in set_priv_reg",
|
||||
"nominated": false,
|
||||
"nomination_type": 3,
|
||||
"resolution": 4,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -62,21 +62,12 @@ nvk_mme_set_priv_reg(struct mme_builder *b)
|
|||
mme_mthd(b, NV9097_SET_FALCON04);
|
||||
mme_emit(b, mme_load(b));
|
||||
|
||||
mme_if(b, ieq, s26, mme_imm(2)) {
|
||||
struct mme_value loop_cond = mme_mov(b, mme_zero());
|
||||
mme_while(b, ine, loop_cond, mme_imm(1)) {
|
||||
mme_state_to(b, loop_cond, NV9097_SET_MME_SHADOW_SCRATCH(0));
|
||||
mme_mthd(b, NV9097_NO_OPERATION);
|
||||
mme_emit(b, mme_zero());
|
||||
};
|
||||
}
|
||||
|
||||
mme_if(b, ine, s26, mme_imm(2)) {
|
||||
mme_loop(b, mme_imm(10)) {
|
||||
mme_mthd(b, NV9097_NO_OPERATION);
|
||||
mme_emit(b, mme_zero());
|
||||
}
|
||||
}
|
||||
struct mme_value loop_cond = mme_mov(b, mme_zero());
|
||||
mme_while(b, ine, loop_cond, mme_imm(1)) {
|
||||
mme_state_to(b, loop_cond, NV9097_SET_MME_SHADOW_SCRATCH(0));
|
||||
mme_mthd(b, NV9097_NO_OPERATION);
|
||||
mme_emit(b, mme_zero());
|
||||
};
|
||||
}
|
||||
|
||||
VkResult
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue