SWDEV-390626 - Support surface Apis
Change-Id: I1691b82d597bfd722d562778f919ebf8ca530e90
This commit is contained in:
@@ -97,7 +97,13 @@ cl_mem_object_type getCLMemObjectType(const unsigned int hipWidth,
|
||||
const unsigned int hipHeight,
|
||||
const unsigned int hipDepth,
|
||||
const unsigned int flags) {
|
||||
if (flags == hipArrayDefault) {
|
||||
if (flags & hipArrayLayered == hipArrayLayered) {
|
||||
if ((hipWidth != 0) && (hipHeight == 0) && (hipDepth != 0)) {
|
||||
return CL_MEM_OBJECT_IMAGE1D_ARRAY;
|
||||
} else if ((hipWidth != 0) && (hipHeight != 0) && (hipDepth != 0)) {
|
||||
return CL_MEM_OBJECT_IMAGE2D_ARRAY;
|
||||
}
|
||||
} else {
|
||||
if ((hipWidth != 0) && (hipHeight == 0) && (hipDepth == 0)) {
|
||||
return CL_MEM_OBJECT_IMAGE1D;
|
||||
} else if ((hipWidth != 0) && (hipHeight != 0) && (hipDepth == 0)) {
|
||||
@@ -105,12 +111,6 @@ cl_mem_object_type getCLMemObjectType(const unsigned int hipWidth,
|
||||
} else if ((hipWidth != 0) && (hipHeight != 0) && (hipDepth != 0)) {
|
||||
return CL_MEM_OBJECT_IMAGE3D;
|
||||
}
|
||||
} else if (flags == hipArrayLayered) {
|
||||
if ((hipWidth != 0) && (hipHeight == 0) && (hipDepth != 0)) {
|
||||
return CL_MEM_OBJECT_IMAGE1D_ARRAY;
|
||||
} else if ((hipWidth != 0) && (hipHeight != 0) && (hipDepth != 0)) {
|
||||
return CL_MEM_OBJECT_IMAGE2D_ARRAY;
|
||||
}
|
||||
}
|
||||
// error scenario. ShouldNotReachHere()
|
||||
return CL_MEM_OBJECT_ALLOCATION_FAILURE;
|
||||
|
||||
Reference in New Issue
Block a user