From 7a4dfd23d5a41aa3affd9897f3e01760852e25d6 Mon Sep 17 00:00:00 2001 From: Yaxun Sam Liu Date: Fri, 31 May 2019 12:07:58 -0400 Subject: [PATCH] Add device_builtin_texture_type attribute to texture type for hip-clang This is required to support texture type for hip-clang. [ROCm/clr commit: 7c20081f8d201bf8bd88dbc12c27af6306118a36] --- .../clr/hipamd/include/hip/hcc_detail/hip_texture_types.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/projects/clr/hipamd/include/hip/hcc_detail/hip_texture_types.h b/projects/clr/hipamd/include/hip/hcc_detail/hip_texture_types.h index 0a68b507e8..b229f4e696 100644 --- a/projects/clr/hipamd/include/hip/hcc_detail/hip_texture_types.h +++ b/projects/clr/hipamd/include/hip/hcc_detail/hip_texture_types.h @@ -45,10 +45,15 @@ THE SOFTWARE. * * * * *******************************************************************************/ +#if __HIP__ +#define __HIP_TEXTURE_ATTRIB __attribute__((device_builtin_texture_type)) +#else +#define __HIP_TEXTURE_ATTRIB +#endif template -struct texture : public textureReference { +struct __HIP_TEXTURE_ATTRIB texture : public textureReference { texture(int norm = 0, enum hipTextureFilterMode fMode = hipFilterModePoint, enum hipTextureAddressMode aMode = hipAddressModeClamp) { normalized = norm;