Create WddmResidencyController to encapsulate basic residency data

Change-Id: I6dd94405ca5ea3a13b137c1e0ead72e615d36e00
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
Maciej Dziuban
2018-10-04 00:52:51 +02:00
committed by sys_ocldev
parent 88bd89cb58
commit b2dd8a9a1d
9 changed files with 111 additions and 53 deletions

View File

@@ -0,0 +1,28 @@
/*
* Copyright (C) 2018 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <atomic>
namespace OCLRT {
class WddmResidencyController {
public:
WddmResidencyController();
void acquireLock();
void releaseLock();
uint64_t getLastTrimFenceValue() { return lastTrimFenceValue; }
void setLastTrimFenceValue(uint64_t value) { lastTrimFenceValue = value; }
protected:
std::atomic<bool> lock;
uint64_t lastTrimFenceValue;
};
} // namespace OCLRT