mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-28 16:48:45 +08:00
Set cooperative flag for debuggable contexts during creation
Related-To: NEO-6668 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
cd9cc53159
commit
b71a12c252
@@ -45,19 +45,24 @@ void OsContextLinux::initializeContext() {
|
||||
this->drmVmIds.resize(deviceBitfield.size(), 0);
|
||||
}
|
||||
|
||||
const auto numberOfCCS = drm.getRootDeviceEnvironment().getHardwareInfo()->gtSystemInfo.CCSInfo.NumberOfCCSEnabled;
|
||||
const bool debuggableContext = drm.isContextDebugSupported() && drm.getRootDeviceEnvironment().executionEnvironment.isDebuggingEnabled() && !isInternalEngine();
|
||||
const bool debuggableContextCooperative = debuggableContext && numberOfCCS > 0;
|
||||
|
||||
for (auto deviceIndex = 0u; deviceIndex < deviceBitfield.size(); deviceIndex++) {
|
||||
if (deviceBitfield.test(deviceIndex)) {
|
||||
auto drmVmId = drm.getVirtualMemoryAddressSpace(deviceIndex);
|
||||
auto drmContextId = drm.createDrmContext(drmVmId, drm.isVmBindAvailable(), isCooperativeEngine());
|
||||
auto drmContextId = drm.createDrmContext(drmVmId, drm.isVmBindAvailable(), isCooperativeEngine() || debuggableContextCooperative);
|
||||
if (drm.areNonPersistentContextsSupported()) {
|
||||
drm.setNonPersistentContext(drmContextId);
|
||||
}
|
||||
|
||||
if (drm.getRootDeviceEnvironment().executionEnvironment.isDebuggingEnabled()) {
|
||||
drm.setUnrecoverableContext(drmContextId);
|
||||
if (!isInternalEngine()) {
|
||||
drm.setContextDebugFlag(drmContextId);
|
||||
}
|
||||
}
|
||||
|
||||
if (debuggableContext) {
|
||||
drm.setContextDebugFlag(drmContextId);
|
||||
}
|
||||
|
||||
if (drm.isPreemptionSupported() && isLowPriority()) {
|
||||
|
||||
Reference in New Issue
Block a user