mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
Gmm interface update
- Use local gmmClientContext instead of pGMMGlobalContext - ResourceInfo and PTmanager creation from gmmClientContext - Mock Gmm context creation in Wddm to have only one instance per run Change-Id: I67e015c57f0ab5524564760fd9a849615615697f
This commit is contained in:
committed by
sys_ocldev
parent
231ad7cfd9
commit
46003145e9
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Intel Corporation
|
||||
* Copyright (c) 2017 - 2018, Intel Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -23,11 +23,12 @@
|
||||
#pragma once
|
||||
#include "runtime/gmm_helper/gmm_lib.h"
|
||||
#include <memory>
|
||||
#include <functional>
|
||||
|
||||
namespace OCLRT {
|
||||
class GmmPageTableMngr {
|
||||
public:
|
||||
virtual ~GmmPageTableMngr() = default;
|
||||
MOCKABLE_VIRTUAL ~GmmPageTableMngr() = default;
|
||||
|
||||
static GmmPageTableMngr *create(GMM_DEVICE_CALLBACKS *deviceCb, unsigned int translationTableFlags, GMM_TRANSLATIONTABLE_CALLBACKS *translationTableCb);
|
||||
|
||||
@@ -44,12 +45,13 @@ class GmmPageTableMngr {
|
||||
}
|
||||
|
||||
protected:
|
||||
static void customDeleter(GMM_PAGETABLE_MGR *gmmPageTableManager);
|
||||
using UniquePtrType = std::unique_ptr<GMM_PAGETABLE_MGR, std::function<void(GMM_PAGETABLE_MGR *)>>;
|
||||
|
||||
GmmPageTableMngr() = default;
|
||||
|
||||
GmmPageTableMngr(GMM_DEVICE_CALLBACKS *deviceCb, unsigned int translationTableFlags, GMM_TRANSLATIONTABLE_CALLBACKS *translationTableCb) {
|
||||
pageTableManager.reset(new GMM_PAGETABLE_MGR(deviceCb, translationTableFlags, translationTableCb));
|
||||
}
|
||||
GmmPageTableMngr(GMM_DEVICE_CALLBACKS *deviceCb, unsigned int translationTableFlags, GMM_TRANSLATIONTABLE_CALLBACKS *translationTableCb);
|
||||
|
||||
std::unique_ptr<GMM_PAGETABLE_MGR> pageTableManager;
|
||||
UniquePtrType pageTableManager;
|
||||
};
|
||||
} // namespace OCLRT
|
||||
|
||||
Reference in New Issue
Block a user