mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 19:30:11 +01:00
nvk: Reserve MME scratch area for communicating with FALCON
mme_set_priv_reg() needs the first three registers to send data to/from FALCON04. If we don't reserve these in the register space, it may stomp other things. This only really matters pre-Volta where we need to use privileged registers for conservative rasterization. However, it's a good idea to reserve the space none the less. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
This commit is contained in:
parent
50a030b02a
commit
03f785083f
2 changed files with 8 additions and 3 deletions
|
|
@ -46,7 +46,7 @@ mme_set_priv_reg(struct mme_builder *b,
|
|||
mme_mthd(b, NV9097_WAIT_FOR_IDLE);
|
||||
mme_emit(b, mme_zero());
|
||||
|
||||
mme_mthd(b, NV9097_SET_MME_SHADOW_SCRATCH(0));
|
||||
mme_mthd(b, NVK_SET_MME_SCRATCH(FALCON_0));
|
||||
mme_emit(b, mme_zero());
|
||||
mme_emit(b, value);
|
||||
mme_emit(b, mask);
|
||||
|
|
@ -56,7 +56,7 @@ mme_set_priv_reg(struct mme_builder *b,
|
|||
|
||||
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_state_to(b, loop_cond, NVK_SET_MME_SCRATCH(FALCON_0));
|
||||
mme_mthd(b, NV9097_NO_OPERATION);
|
||||
mme_emit(b, mme_zero());
|
||||
};
|
||||
|
|
|
|||
|
|
@ -35,7 +35,12 @@ enum nvk_mme {
|
|||
};
|
||||
|
||||
enum nvk_mme_scratch {
|
||||
NVK_MME_SCRATCH_CS_INVOCATIONS_HI = 0,
|
||||
/* These are reserved for communicating with FALCON */
|
||||
NVK_MME_SCRATCH_FALCON_0 = 0,
|
||||
NVK_MME_SCRATCH_FALCON_1 = 0,
|
||||
NVK_MME_SCRATCH_FALCON_2 = 0,
|
||||
|
||||
NVK_MME_SCRATCH_CS_INVOCATIONS_HI,
|
||||
NVK_MME_SCRATCH_CS_INVOCATIONS_LO,
|
||||
NVK_MME_SCRATCH_DRAW_BEGIN,
|
||||
NVK_MME_SCRATCH_DRAW_COUNT,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue