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;