P4 to Git Change 1547686 by cpaquot@cpaquot-ocl-lc-lnx on 2018/04/30 00:52:23

SWDEV-145570 - [HIP] CreateTexture with hipArray

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/hip/hip_texture.cpp#6 edit


[ROCm/hip commit: 5fc5d098a9]
Этот коммит содержится в:
foreman
2018-04-30 01:03:06 -04:00
родитель b51c887a83
Коммит 9bbba2ee75
+20 -1
Просмотреть файл
@@ -158,7 +158,26 @@ hipError_t hipCreateTextureObject(hipTextureObject_t* pTexObject, const hipResou
switch (pResDesc->resType) {
case hipResourceTypeArray:
assert(0);
{
memory = amd::SvmManager::FindSvmBuffer(pResDesc->res.array.array->data);
getChannelOrderAndType(pResDesc->res.array.array->desc, pTexDesc->readMode,
&image_format.image_channel_order, &image_format.image_channel_data_type);
const amd::Image::Format imageFormat(image_format);
switch (pResDesc->res.array.array->type) {
case hipArrayLayered:
case hipArrayCubemap:
assert(0);
break;
case hipArraySurfaceLoadStore:
case hipArrayTextureGather:
case hipArrayDefault:
default:
image = new (*g_context) amd::Image(*memory->asBuffer(), CL_MEM_OBJECT_IMAGE2D, memory->getMemFlags(), imageFormat,
pResDesc->res.array.array->width, pResDesc->res.array.array->height, 1, 0, 0);
break;
}
}
break;
case hipResourceTypeMipmappedArray:
assert(0);