mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
Pass Wddm to WddmResidencyController
Change-Id: I2379ffdfb740a869f6d157ed22f40ce509d6bebe Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
8ead8f727f
commit
4aae1a817b
@@ -12,7 +12,7 @@
|
||||
|
||||
namespace OCLRT {
|
||||
|
||||
OsContextWin::OsContextImpl(Wddm &wddm, uint32_t osContextId) : wddm(wddm), residencyController(osContextId) {
|
||||
OsContextWin::OsContextImpl(Wddm &wddm, uint32_t osContextId) : wddm(wddm), residencyController(wddm, osContextId) {
|
||||
UNRECOVERABLE_IF(!wddm.isInitialized());
|
||||
auto wddmInterface = wddm.getWddmInterface();
|
||||
if (!wddm.createContext(context)) {
|
||||
|
||||
@@ -8,11 +8,12 @@
|
||||
#include "runtime/os_interface/windows/wddm_residency_controller.h"
|
||||
#include "runtime/os_interface/windows/wddm_allocation.h"
|
||||
#include "runtime/os_interface/debug_settings_manager.h"
|
||||
#include "runtime/os_interface/windows/wddm/wddm.h"
|
||||
#include "runtime/utilities/spinlock.h"
|
||||
|
||||
namespace OCLRT {
|
||||
|
||||
WddmResidencyController::WddmResidencyController(uint32_t osContextId) : osContextId(osContextId) {}
|
||||
WddmResidencyController::WddmResidencyController(Wddm &wddm, uint32_t osContextId) : wddm(wddm), osContextId(osContextId) {}
|
||||
|
||||
void WddmResidencyController::acquireLock() {
|
||||
bool previousLockValue = false;
|
||||
|
||||
@@ -17,10 +17,11 @@ namespace OCLRT {
|
||||
|
||||
class GraphicsAllocation;
|
||||
class WddmAllocation;
|
||||
class Wddm;
|
||||
|
||||
class WddmResidencyController {
|
||||
public:
|
||||
WddmResidencyController(uint32_t osContextId);
|
||||
WddmResidencyController(Wddm &wddm, uint32_t osContextId);
|
||||
|
||||
void acquireLock();
|
||||
void releaseLock();
|
||||
@@ -46,9 +47,12 @@ class WddmResidencyController {
|
||||
void resetMonitoredFenceParams(D3DKMT_HANDLE &handle, uint64_t *cpuAddress, D3DGPU_VIRTUAL_ADDRESS &gpuAddress);
|
||||
|
||||
protected:
|
||||
Wddm &wddm;
|
||||
uint32_t osContextId;
|
||||
|
||||
std::atomic<bool> lock = false;
|
||||
std::atomic_flag trimCallbackLock = ATOMIC_FLAG_INIT;
|
||||
|
||||
uint64_t lastTrimFenceValue = 0u;
|
||||
ResidencyContainer trimCandidateList;
|
||||
uint32_t trimCandidatesCount = 0;
|
||||
|
||||
Reference in New Issue
Block a user