Update getGraphicsAllocationType

Change-Id: I7613d0d5550d8032b960f86aa117b4baf6b9216f
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2019-01-28 15:27:15 +01:00
committed by sys_ocldev
parent 783f408f9f
commit 3fe78d263b
11 changed files with 153 additions and 107 deletions

View File

@@ -6,6 +6,7 @@
*/
#pragma once
#include "runtime/context/context_type.h"
#include "runtime/memory_manager/memory_constants.h"
#include "runtime/mem_obj/mem_obj.h"
#include "runtime/helpers/basic_math.h"
@@ -138,7 +139,9 @@ class Buffer : public MemObj {
bool &isZeroCopy,
bool &copyMemoryFromHostPtr,
MemoryManager *memMngr);
static GraphicsAllocation::AllocationType getGraphicsAllocationType(cl_mem_flags flags, bool sharedContext, bool renderCompressedBuffers, bool localMemoryEnabled);
static GraphicsAllocation::AllocationType getGraphicsAllocationType(const MemoryProperties &properties, bool sharedContext,
ContextType contextType, bool renderCompressedBuffers,
bool localMemoryEnabled);
static bool isReadOnlyMemoryPermittedByFlags(cl_mem_flags flags);
void transferData(void *dst, void *src, size_t copySize, size_t copyOffset);