Check if direct submission enable in OsContext

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2021-02-10 15:13:50 +00:00
committed by Compute-Runtime-Automation
parent 8a700c5187
commit 7c99739b89
17 changed files with 176 additions and 97 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2020 Intel Corporation
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -17,6 +17,9 @@
namespace NEO {
class OSInterface;
struct DirectSubmissionProperties;
struct HardwareInfo;
class OsContext : public ReferenceTrackedObject<OsContext> {
public:
OsContext() = delete;
@@ -38,6 +41,12 @@ class OsContext : public ReferenceTrackedObject<OsContext> {
bool isDirectSubmissionActive() { return directSubmissionActive; }
void setDirectSubmissionActive() { directSubmissionActive = true; }
bool isDirectSubmissionAvailable(const HardwareInfo &hwInfo, bool &submitOnInit);
bool checkDirectSubmissionSupportsEngine(const DirectSubmissionProperties &directSubmissionProperty,
aub_stream::EngineType contextEngineType,
bool &startOnInit,
bool &startInContext);
protected:
OsContext(uint32_t contextId, DeviceBitfield deviceBitfield, aub_stream::EngineType engineType, PreemptionMode preemptionMode,
bool lowPriority, bool internalEngine, bool rootDevice)