Remove isInitialized() method from OsContext

We can fail early, instead of constructing an invalid object

Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
Maciej Dziuban
2021-04-12 16:17:35 +00:00
committed by Compute-Runtime-Automation
parent 5f9dbef401
commit fd9fb3e46b
8 changed files with 21 additions and 40 deletions

View File

@@ -32,12 +32,10 @@ class OsContextWin : public OsContext {
void setWddmContextHandle(D3DKMT_HANDLE wddmContextHandle) { this->wddmContextHandle = wddmContextHandle; }
HardwareQueue getHwQueue() const { return hardwareQueue; }
void setHwQueue(HardwareQueue hardwareQueue) { this->hardwareQueue = hardwareQueue; }
bool isInitialized() const override;
Wddm *getWddm() const { return &wddm; }
MOCKABLE_VIRTUAL WddmResidencyController &getResidencyController() { return residencyController; }
protected:
bool initialized = false;
D3DKMT_HANDLE wddmContextHandle = 0;
HardwareQueue hardwareQueue;
Wddm &wddm;