P4 to Git Change 2007650 by jujiang@JJ-OCL-hip on 2019/10/02 16:04:31

SWDEV-205724 - Issue with hipTexRefSetAddress in HIP/PAL on Windows

	Handle nullptr channel format desc

	http://ocltc.amd.com/reviews/r/18065/

Affected files ...

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


[ROCm/hip commit: 4c3b676041]
This commit is contained in:
foreman
2019-10-02 16:24:33 -04:00
والد dd39229347
کامیت f9e24d213d
@@ -386,13 +386,17 @@ hipError_t ihipBindTexture(cl_mem_object_type type,
case CL_MEM_OBJECT_IMAGE1D:
resDesc.resType = hipResourceTypeLinear;
resDesc.res.linear.devPtr = const_cast<void*>(devPtr);
resDesc.res.linear.desc = *desc;
if (nullptr != desc) {
resDesc.res.linear.desc = *desc;
}
resDesc.res.linear.sizeInBytes = image->getSize();
break;
case CL_MEM_OBJECT_IMAGE2D:
resDesc.resType = hipResourceTypePitch2D;
resDesc.res.pitch2D.devPtr = const_cast<void*>(devPtr);
resDesc.res.pitch2D.desc = *desc;
if (nullptr != desc) {
resDesc.res.pitch2D.desc = *desc;
}
resDesc.res.pitch2D.width = width;
resDesc.res.pitch2D.height = height;
resDesc.res.pitch2D.pitchInBytes = pitch;