Extend ExecutePM4() to accept completion signal and fences

ExecutePM4() function can optionally accept extra arguments for
acquire fence scope, release fence scope andcompletion signal. When
a completion signal is provided, ExecutePM4() does not wait for the
commands to complete.

Change-Id: Ib2a433b7bce1cb6260be8b76fe902335bd5dfada
This commit is contained in:
David Yat Sin
2023-08-30 17:31:13 +00:00
parent d7adc94e3f
commit 721e56ef5c
5 changed files with 59 additions and 22 deletions
@@ -120,8 +120,11 @@ class QueueWrapper : public Queue {
hsa_status_t GetCUMasking(uint32_t num_cu_mask_count, uint32_t* cu_mask) override {
return wrapped->GetCUMasking(num_cu_mask_count, cu_mask);
}
void ExecutePM4(uint32_t* cmd_data, size_t cmd_size_b) override {
wrapped->ExecutePM4(cmd_data, cmd_size_b);
void ExecutePM4(uint32_t* cmd_data, size_t cmd_size_b,
hsa_fence_scope_t acquireFence = HSA_FENCE_SCOPE_NONE,
hsa_fence_scope_t releaseFence = HSA_FENCE_SCOPE_NONE,
hsa_signal_t* signal = NULL) override {
wrapped->ExecutePM4(cmd_data, cmd_size_b, acquireFence, releaseFence, signal);
}
void SetProfiling(bool enabled) override { wrapped->SetProfiling(enabled); }