mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
nvk: Add a generic event_report_semaphore path
and use it for the 2D engine.
This commit is contained in:
parent
212b9dcd38
commit
268ef76470
1 changed files with 17 additions and 2 deletions
|
|
@ -189,8 +189,7 @@ nvk_event_report_semaphore(struct nvk_cmd_buffer *cmd,
|
|||
.operation = OPERATION_RELEASE,
|
||||
.structure_size = STRUCTURE_SIZE_ONE_WORD,
|
||||
});
|
||||
} else {
|
||||
assert(subc == SUBC_NV90B5);
|
||||
} else if (subc == SUBC_NV90B5) {
|
||||
struct nv_push *p = nvk_cmd_buffer_push(cmd, 6);
|
||||
|
||||
P_MTHD(p, NV90B5, SET_SEMAPHORE_A);
|
||||
|
|
@ -204,6 +203,22 @@ nvk_event_report_semaphore(struct nvk_cmd_buffer *cmd,
|
|||
.flush_enable = FLUSH_ENABLE_TRUE,
|
||||
/* Note: FLUSH_TYPE=SYS implicitly for NVC3B5+ */
|
||||
});
|
||||
} else {
|
||||
/* This should work for any engine. This assert is here as a reminder
|
||||
* to check for an engine-specific version, since those will typically
|
||||
* have perf benefits.
|
||||
*/
|
||||
assert(subc == SUBC_NV902D);
|
||||
struct nv_push *p = nvk_cmd_buffer_push(cmd, 5);
|
||||
__push_mthd(p, nvk_cmd_buffer_last_subchannel(cmd), NV906F_SEMAPHOREA);
|
||||
P_NV906F_SEMAPHOREA(p, addr >> 32);
|
||||
P_NV906F_SEMAPHOREB(p, (addr & UINT32_MAX) >> 2);
|
||||
P_NV906F_SEMAPHOREC(p, value);
|
||||
P_NV906F_SEMAPHORED(p, {
|
||||
.operation = OPERATION_RELEASE,
|
||||
.release_wfi = RELEASE_WFI_EN,
|
||||
.release_size = RELEASE_SIZE_4BYTE,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue