SWDEV-290298 - add a flag to indicate the primary context active status
Change-Id: Ia31790706d3f855bc1eedf5ef874e471
Este commit está contenido en:
@@ -377,6 +377,9 @@ void Command::enqueue() {
|
||||
((commandWaitBits_ & 0x2) != 0)) {
|
||||
awaitCompletion();
|
||||
}
|
||||
|
||||
// set this queue status is active
|
||||
queue_->SetQueueStatus();
|
||||
}
|
||||
|
||||
// ================================================================================================
|
||||
|
||||
@@ -39,7 +39,8 @@ HostQueue::HostQueue(Context& context, Device& device, cl_command_queue_properti
|
||||
priority, cuMask),
|
||||
lastEnqueueCommand_(nullptr),
|
||||
head_(nullptr),
|
||||
tail_(nullptr) {
|
||||
tail_(nullptr),
|
||||
isActive_(false) {
|
||||
if (AMD_DIRECT_DISPATCH) {
|
||||
// Initialize the queue
|
||||
thread_.Init(this);
|
||||
|
||||
@@ -278,9 +278,18 @@ class HostQueue : public CommandQueue {
|
||||
//! Reset the command batch list
|
||||
void ResetSubmissionBatch() { head_ = nullptr; }
|
||||
|
||||
//! Set queue status
|
||||
void SetQueueStatus() { isActive_ = true; }
|
||||
|
||||
//! Get queue status
|
||||
bool GetQueueStatus() { return isActive_; }
|
||||
|
||||
private:
|
||||
Command* head_; //!< Head of the batch list
|
||||
Command* tail_; //!< Tail of the batch list
|
||||
|
||||
//! True if this command queue is active
|
||||
bool isActive_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Referencia en una nueva incidencia
Block a user