mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Set context debuggable when debugging is enabled
Related-to: NEO-6896 Signed-off-by: Yates, Brandon <brandon.yates@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
5b297ba860
commit
adc51c1b47
@ -7,6 +7,8 @@
|
||||
|
||||
#include "shared/source/os_interface/windows/os_context_win.h"
|
||||
|
||||
#include "shared/source/execution_environment/execution_environment.h"
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
#include "shared/source/os_interface/windows/wddm/wddm.h"
|
||||
#include "shared/source/os_interface/windows/wddm/wddm_interface.h"
|
||||
@ -26,6 +28,10 @@ OsContextWin::OsContextWin(Wddm &wddm, uint32_t contextId, const EngineDescripto
|
||||
residencyController(wddm, contextId) {}
|
||||
|
||||
void OsContextWin::initializeContext() {
|
||||
|
||||
if (wddm.getRootDeviceEnvironment().executionEnvironment.isDebuggingEnabled()) {
|
||||
debuggableContext = wddm.getRootDeviceEnvironment().osInterface->isDebugAttachAvailable() && !isInternalEngine();
|
||||
}
|
||||
auto wddmInterface = wddm.getWddmInterface();
|
||||
UNRECOVERABLE_IF(!wddm.createContext(*this));
|
||||
|
||||
|
@ -35,6 +35,7 @@ class OsContextWin : public OsContext {
|
||||
MOCKABLE_VIRTUAL WddmResidencyController &getResidencyController() { return residencyController; }
|
||||
static OsContext *create(OSInterface *osInterface, uint32_t contextId, const EngineDescriptor &engineDescriptor);
|
||||
void reInitializeContext() override;
|
||||
MOCKABLE_VIRTUAL bool isDebuggableContext() { return debuggableContext; };
|
||||
|
||||
protected:
|
||||
void initializeContext() override;
|
||||
@ -43,5 +44,6 @@ class OsContextWin : public OsContext {
|
||||
HardwareQueue hardwareQueue;
|
||||
Wddm &wddm;
|
||||
WddmResidencyController residencyController;
|
||||
bool debuggableContext = false;
|
||||
};
|
||||
} // namespace NEO
|
||||
|
Reference in New Issue
Block a user