From b61a7da1ec9de7ee615140cde994c2c067adbb93 Mon Sep 17 00:00:00 2001 From: Vladislav Sytchenko Date: Tue, 17 Mar 2020 16:53:54 -0400 Subject: [PATCH] Correct the declaration of hipBindTexture2D() The texture reference needs to be passed as a constant pointer. Change-Id: Idde461f0f328ac87ce677b6bab3203161b514cbf [ROCm/hip commit: 3e460ab514071bbc81242417fa9cc91554fdc1d3] --- projects/hip/include/hip/hcc_detail/hip_runtime_api.h | 11 +++++++++++ projects/hip/vdi/hip_texture.cpp | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/projects/hip/include/hip/hcc_detail/hip_runtime_api.h b/projects/hip/include/hip/hcc_detail/hip_runtime_api.h index 3a75fb680f..fa6b7d95f0 100644 --- a/projects/hip/include/hip/hcc_detail/hip_runtime_api.h +++ b/projects/hip/include/hip/hcc_detail/hip_runtime_api.h @@ -3420,9 +3420,20 @@ hipError_t hipBindTexture(size_t* offset, struct texture& tex, } // C API +#if __HIP_VDI__ +hipError_t hipBindTexture2D( + size_t* offset, + const textureReference* tex, + const void* devPtr, + const hipChannelFormatDesc* desc, + size_t width, + size_t height, + size_t pitch); +#else hipError_t hipBindTexture2D(size_t* offset, textureReference* tex, const void* devPtr, const hipChannelFormatDesc* desc, size_t width, size_t height, size_t pitch); +#endif hipError_t ihipBindTexture2DImpl(int dim, enum hipTextureReadMode readMode, size_t* offset, const void* devPtr, const struct hipChannelFormatDesc* desc, diff --git a/projects/hip/vdi/hip_texture.cpp b/projects/hip/vdi/hip_texture.cpp index 0c9189a6ad..7aa5204424 100644 --- a/projects/hip/vdi/hip_texture.cpp +++ b/projects/hip/vdi/hip_texture.cpp @@ -457,7 +457,7 @@ hipError_t ihipBindTexture2D(size_t* offset, } hipError_t hipBindTexture2D(size_t* offset, - textureReference* texref, + const textureReference* texref, const void* devPtr, const hipChannelFormatDesc* desc, size_t width,