mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-07 04:48:08 +08:00
Add additional create buffer arguments
Allow to: disable performance hints, make allocation lockable Used in BufferPoolAllocator Related-To: NEO-7332 Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
50df7f430e
commit
67bfebb25e
@@ -57,6 +57,10 @@ extern ValidateInputAndCreateBufferFunc validateInputAndCreateBuffer;
|
||||
|
||||
class Buffer : public MemObj {
|
||||
public:
|
||||
struct AdditionalBufferCreateArgs {
|
||||
bool doNotProvidePerformanceHints;
|
||||
bool makeAllocationLockable;
|
||||
};
|
||||
constexpr static size_t maxBufferSizeForReadWriteOnCpu = 10 * MB;
|
||||
constexpr static size_t maxBufferSizeForCopyOnCpu = 64 * KB;
|
||||
constexpr static cl_ulong maskMagic = 0xFFFFFFFFFFFFFFFFLL;
|
||||
@@ -80,6 +84,13 @@ class Buffer : public MemObj {
|
||||
void *hostPtr,
|
||||
cl_int &errcodeRet);
|
||||
|
||||
static Buffer *create(Context *context,
|
||||
cl_mem_flags flags,
|
||||
size_t size,
|
||||
void *hostPtr,
|
||||
AdditionalBufferCreateArgs &bufferCreateArgs,
|
||||
cl_int &errcodeRet);
|
||||
|
||||
static Buffer *create(Context *context,
|
||||
const MemoryProperties &properties,
|
||||
cl_mem_flags flags,
|
||||
@@ -88,6 +99,15 @@ class Buffer : public MemObj {
|
||||
void *hostPtr,
|
||||
cl_int &errcodeRet);
|
||||
|
||||
static Buffer *create(Context *context,
|
||||
const MemoryProperties &properties,
|
||||
cl_mem_flags flags,
|
||||
cl_mem_flags_intel flagsIntel,
|
||||
size_t size,
|
||||
void *hostPtr,
|
||||
AdditionalBufferCreateArgs &bufferCreateArgs,
|
||||
cl_int &errcodeRet);
|
||||
|
||||
static Buffer *createSharedBuffer(Context *context,
|
||||
cl_mem_flags flags,
|
||||
SharingHandler *sharingHandler,
|
||||
|
||||
Reference in New Issue
Block a user