P4 to Git Change 1968576 by cpaquot@cpaquot-ocl-lc-lnx on 2019/07/16 15:48:18
SWDEV-145570 - [HIP] update code after header change
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/hip/hip_memory.cpp#62 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_texture.cpp#12 edit
[ROCm/hip commit: fd89a62ac3]
Этот коммит содержится в:
@@ -437,22 +437,21 @@ hipError_t hipArrayCreate(hipArray** array, const HIP_ARRAY_DESCRIPTOR* pAllocat
|
||||
}
|
||||
|
||||
*array = (hipArray*)malloc(sizeof(hipArray));
|
||||
array[0]->drvDesc = *pAllocateArray;
|
||||
array[0]->width = pAllocateArray->width;
|
||||
array[0]->height = pAllocateArray->height;
|
||||
array[0]->width = pAllocateArray->Width;
|
||||
array[0]->height = pAllocateArray->Height;
|
||||
array[0]->isDrv = true;
|
||||
array[0]->textureType = hipTextureType2D;
|
||||
void** ptr = &array[0]->data;
|
||||
|
||||
cl_channel_order channelOrder;
|
||||
cl_channel_type channelType;
|
||||
getDrvChannelOrderAndType(pAllocateArray->format, pAllocateArray->numChannels,
|
||||
getDrvChannelOrderAndType(pAllocateArray->Format, pAllocateArray->NumChannels,
|
||||
&channelOrder, &channelType);
|
||||
|
||||
const cl_image_format image_format = { channelOrder, channelType };
|
||||
size_t size = pAllocateArray->width;
|
||||
if (pAllocateArray->height > 0) {
|
||||
size = size * pAllocateArray->height;
|
||||
size_t size = pAllocateArray->Width;
|
||||
if (pAllocateArray->Height > 0) {
|
||||
size = size * pAllocateArray->Height;
|
||||
}
|
||||
|
||||
size_t pitch = 0;
|
||||
|
||||
@@ -577,5 +577,5 @@ hipError_t hipTexRefSetAddress2D(textureReference* tex, const HIP_ARRAY_DESCRIPT
|
||||
}
|
||||
|
||||
size_t offset;
|
||||
HIP_RETURN(ihipBindTexture(CL_MEM_OBJECT_IMAGE2D, &offset, tex, devPtr, nullptr, desc->width, desc->height, pitch));
|
||||
HIP_RETURN(ihipBindTexture(CL_MEM_OBJECT_IMAGE2D, &offset, tex, devPtr, nullptr, desc->Width, desc->Height, pitch));
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user