From 215a715fb12e09a88ee0cd936769e5c3106f5d62 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) [ROCm/hip-tests commit: d9d6374a633bb7b0ee4c7657a6701028c9d1e45c] --- .../samples/2_Cookbook/11_texture_driver/tex2dKernel.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/projects/hip-tests/samples/2_Cookbook/11_texture_driver/tex2dKernel.cpp b/projects/hip-tests/samples/2_Cookbook/11_texture_driver/tex2dKernel.cpp index 90645f6b72..6fd49fdb0f 100644 --- a/projects/hip-tests/samples/2_Cookbook/11_texture_driver/tex2dKernel.cpp +++ b/projects/hip-tests/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;