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]
This commit is contained in:
@@ -158,7 +158,26 @@ hipError_t hipCreateTextureObject(hipTextureObject_t* pTexObject, const hipResou
|
|||||||
|
|
||||||
switch (pResDesc->resType) {
|
switch (pResDesc->resType) {
|
||||||
case hipResourceTypeArray:
|
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;
|
break;
|
||||||
case hipResourceTypeMipmappedArray:
|
case hipResourceTypeMipmappedArray:
|
||||||
assert(0);
|
assert(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user