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:
@@ -346,8 +346,24 @@ class Queue : public Checked<0xFA3906A679F9DB49>, private LocalQueue {
|
||||
/// @return hsa_status_t
|
||||
virtual hsa_status_t GetCUMasking(uint32_t num_cu_mask_count, uint32_t* cu_mask) = 0;
|
||||
|
||||
// @brief Submits a block of PM4 and waits until it has been executed.
|
||||
virtual void ExecutePM4(uint32_t* cmd_data, size_t cmd_size_b) = 0;
|
||||
/// @brief Submits a block of PM4.
|
||||
///
|
||||
/// @param cmd_data pointer to command buffer
|
||||
///
|
||||
/// @param cmd_size_b command buffer size in bytes
|
||||
///
|
||||
/// @param acquireFence acquire-fence type
|
||||
///
|
||||
/// @param releaseFence acquire-fence type
|
||||
///
|
||||
/// @param signal optional wait signal
|
||||
///
|
||||
/// if @p signal is provided, function will return without waiting for commands to be executed
|
||||
/// if @p signal is NULL, waits until commands have been executed.
|
||||
virtual 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) = 0;
|
||||
|
||||
virtual void SetProfiling(bool enabled) {
|
||||
AMD_HSA_BITS_SET(amd_queue_.queue_properties, AMD_QUEUE_PROPERTIES_ENABLE_PROFILING,
|
||||
|
||||
Reference in New Issue
Block a user