mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-26 07:00:17 +08:00
Make small buffer allocations lockable
Allocations of buffers <= 64KB will be lockable, to allow copying through locked pointer. Related-To: NEO-7332 Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
3b97ca8709
commit
9b9b0f10ef
@@ -57,6 +57,8 @@ class GraphicsAllocation : public IDNode<GraphicsAllocation> {
|
||||
GPU
|
||||
};
|
||||
|
||||
static constexpr auto largestLockableBufferSize = 64 * KB;
|
||||
|
||||
~GraphicsAllocation() override;
|
||||
GraphicsAllocation &operator=(const GraphicsAllocation &) = delete;
|
||||
GraphicsAllocation(const GraphicsAllocation &) = delete;
|
||||
@@ -212,6 +214,10 @@ class GraphicsAllocation : public IDNode<GraphicsAllocation> {
|
||||
type == AllocationType::DEBUG_MODULE_AREA;
|
||||
}
|
||||
|
||||
static bool isSmallBuffer(AllocationType type, size_t size) {
|
||||
return type == AllocationType::BUFFER && size <= largestLockableBufferSize;
|
||||
}
|
||||
|
||||
static bool isDebugSurfaceAllocationType(AllocationType type) {
|
||||
return type == AllocationType::DEBUG_CONTEXT_SAVE_AREA ||
|
||||
type == AllocationType::DEBUG_SBA_TRACKING_BUFFER;
|
||||
|
||||
Reference in New Issue
Block a user