mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Add implementation of new OpenCL 3.0 API functions
Additionally unify implementation of API functions related to creating buffers and images. Related-To: NEO-4368 Change-Id: Icfafc32f15e667e249fb318072194b6f76bd6481 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
37a6a900a8
commit
0a6da52bd4
@@ -16,23 +16,22 @@ void MemoryPropertiesHelper::addExtraMemoryProperties(MemoryProperties &properti
|
||||
bool MemoryPropertiesHelper::parseMemoryProperties(const cl_mem_properties_intel *properties, MemoryProperties &memoryProperties,
|
||||
cl_mem_flags &flags, cl_mem_flags_intel &flagsIntel,
|
||||
cl_mem_alloc_flags_intel &allocflags, ObjType objectType, Context &context) {
|
||||
if (properties == nullptr) {
|
||||
return true;
|
||||
}
|
||||
|
||||
for (int i = 0; properties[i] != 0; i += 2) {
|
||||
switch (properties[i]) {
|
||||
case CL_MEM_FLAGS:
|
||||
flags |= static_cast<cl_mem_flags>(properties[i + 1]);
|
||||
break;
|
||||
case CL_MEM_FLAGS_INTEL:
|
||||
flagsIntel |= static_cast<cl_mem_flags_intel>(properties[i + 1]);
|
||||
break;
|
||||
case CL_MEM_ALLOC_FLAGS_INTEL:
|
||||
allocflags |= static_cast<cl_mem_alloc_flags_intel>(properties[i + 1]);
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
if (properties != nullptr) {
|
||||
for (int i = 0; properties[i] != 0; i += 2) {
|
||||
switch (properties[i]) {
|
||||
case CL_MEM_FLAGS:
|
||||
flags |= static_cast<cl_mem_flags>(properties[i + 1]);
|
||||
break;
|
||||
case CL_MEM_FLAGS_INTEL:
|
||||
flagsIntel |= static_cast<cl_mem_flags_intel>(properties[i + 1]);
|
||||
break;
|
||||
case CL_MEM_ALLOC_FLAGS_INTEL:
|
||||
allocflags |= static_cast<cl_mem_alloc_flags_intel>(properties[i + 1]);
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user