mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Add GraphicsAllocation::isLockable method
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
83a1a52bdc
commit
9026362b76
@@ -98,7 +98,8 @@ class GraphicsAllocation : public IDNode<GraphicsAllocation> {
|
||||
DEBUG_MODULE_AREA,
|
||||
UNIFIED_SHARED_MEMORY,
|
||||
WORK_PARTITION_SURFACE,
|
||||
GPU_TIMESTAMP_DEVICE_BUFFER
|
||||
GPU_TIMESTAMP_DEVICE_BUFFER,
|
||||
COUNT
|
||||
};
|
||||
|
||||
~GraphicsAllocation() override;
|
||||
@@ -229,6 +230,14 @@ class GraphicsAllocation : public IDNode<GraphicsAllocation> {
|
||||
allocationType == AllocationType::DEBUG_CONTEXT_SAVE_AREA ||
|
||||
allocationType == AllocationType::DEBUG_MODULE_AREA;
|
||||
}
|
||||
static bool isLockable(AllocationType allocationType) {
|
||||
return isCpuAccessRequired(allocationType) ||
|
||||
isIsaAllocationType(allocationType) ||
|
||||
allocationType == AllocationType::BUFFER ||
|
||||
allocationType == AllocationType::BUFFER_HOST_MEMORY ||
|
||||
allocationType == AllocationType::GPU_TIMESTAMP_DEVICE_BUFFER ||
|
||||
allocationType == AllocationType::SVM_GPU;
|
||||
}
|
||||
|
||||
static bool isIsaAllocationType(GraphicsAllocation::AllocationType type) {
|
||||
return type == GraphicsAllocation::AllocationType::KERNEL_ISA ||
|
||||
|
||||
Reference in New Issue
Block a user