From d9d6374a633bb7b0ee4c7657a6701028c9d1e45c Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Wed, 28 Aug 2019 21:03:20 -0400 Subject: [PATCH] Fix sample 11_texture_driver for hip-clang (#1370) --- samples/2_Cookbook/11_texture_driver/tex2dKernel.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/samples/2_Cookbook/11_texture_driver/tex2dKernel.cpp b/samples/2_Cookbook/11_texture_driver/tex2dKernel.cpp index 90645f6b72..6fd49fdb0f 100644 --- a/samples/2_Cookbook/11_texture_driver/tex2dKernel.cpp +++ b/samples/2_Cookbook/11_texture_driver/tex2dKernel.cpp @@ -21,7 +21,12 @@ THE SOFTWARE. */ #include "hip/hip_runtime.h" -extern texture tex; +#if __HIP__ +__hip_pinned_shadow__ +#else +extern +#endif +texture tex; extern "C" __global__ void tex2dKernel(float* outputData, int width, int height) { int x = hipBlockIdx_x * hipBlockDim_x + hipThreadIdx_x;