mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-26 07:00:17 +08:00
feature: support explicit memory locking
Added lockMemory in context to explicitly locking memory, Added a boolean flag in graphics_allocation to indicate the allocation is locked, and modified memory_operations_handler to add lock(). Change the logic to work correctly with makeResident() when lock() is called previously for the same memory region Related-To: NEO-8277 Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
d41f508e43
commit
27a3307bb0
@@ -124,6 +124,8 @@ class GraphicsAllocation : public IDNode<GraphicsAllocation> {
|
||||
bool peekEvictable() const { return allocationInfo.flags.evictable; }
|
||||
bool isFlushL3Required() const { return allocationInfo.flags.flushL3Required; }
|
||||
void setFlushL3Required(bool flushL3Required) { allocationInfo.flags.flushL3Required = flushL3Required; }
|
||||
bool isLockedMemory() const { return allocationInfo.flags.lockedMemory; }
|
||||
void setLockedMemory(bool locked) { allocationInfo.flags.lockedMemory = locked; }
|
||||
|
||||
bool isUncacheable() const { return allocationInfo.flags.uncacheable; }
|
||||
void setUncacheable(bool uncacheable) { allocationInfo.flags.uncacheable = uncacheable; }
|
||||
@@ -345,7 +347,8 @@ class GraphicsAllocation : public IDNode<GraphicsAllocation> {
|
||||
uint32_t flushL3Required : 1;
|
||||
uint32_t uncacheable : 1;
|
||||
uint32_t is32BitAllocation : 1;
|
||||
uint32_t reserved : 27;
|
||||
uint32_t lockedMemory : 1;
|
||||
uint32_t reserved : 26;
|
||||
} flags;
|
||||
uint32_t allFlags = 0u;
|
||||
};
|
||||
@@ -355,6 +358,7 @@ class GraphicsAllocation : public IDNode<GraphicsAllocation> {
|
||||
flags.evictable = true;
|
||||
flags.flushL3Required = true;
|
||||
flags.is32BitAllocation = false;
|
||||
flags.lockedMemory = false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user