From e0dfaf51e9f89cc434956fdf02b41aeb57b04836 Mon Sep 17 00:00:00 2001 From: Vladislav Sytchenko Date: Thu, 5 Nov 2020 10:42:18 -0500 Subject: [PATCH] Report maxTexture1DLinear property Change-Id: If562bbee80d8b98712806cb8258b5a7482d33bf6 [ROCm/hip commit: fb04bdc4f2c4ee86465189ebd454f0fc7ca21d9c] --- projects/hip/include/hip/hip_runtime_api.h | 1 + projects/hip/rocclr/hip_device.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/projects/hip/include/hip/hip_runtime_api.h b/projects/hip/include/hip/hip_runtime_api.h index 7b79582807..35e3111bc3 100644 --- a/projects/hip/include/hip/hip_runtime_api.h +++ b/projects/hip/include/hip/hip_runtime_api.h @@ -119,6 +119,7 @@ typedef struct hipDeviceProp_t { int integrated; ///< APU vs dGPU int cooperativeLaunch; ///< HIP device supports cooperative launch int cooperativeMultiDeviceLaunch; ///< HIP device supports cooperative launch on multiple devices + int maxTexture1DLinear; ///< Maximum size for 1D textures bound to linear memory int maxTexture1D; ///< Maximum number of elements in 1D images int maxTexture2D[2]; ///< Maximum dimensions (width, height) of 2D images, in image elements int maxTexture3D[3]; ///< Maximum dimensions (width, height, depth) of 3D images, in image elements diff --git a/projects/hip/rocclr/hip_device.cpp b/projects/hip/rocclr/hip_device.cpp index 5eee09540b..2c1caa70f9 100644 --- a/projects/hip/rocclr/hip_device.cpp +++ b/projects/hip/rocclr/hip_device.cpp @@ -209,6 +209,7 @@ hipError_t hipGetDeviceProperties ( hipDeviceProp_t* props, hipDevice_t device ) deviceProps.cooperativeMultiDeviceUnmatchedBlockDim = info.cooperativeMultiDeviceGroups_; deviceProps.cooperativeMultiDeviceUnmatchedSharedMem = info.cooperativeMultiDeviceGroups_; + deviceProps.maxTexture1DLinear = 16 * info.imageMaxBufferSize_; // Max pixel size is 16 bytes deviceProps.maxTexture1D = info.image1DMaxWidth_; deviceProps.maxTexture2D[0] = info.image2DMaxWidth_; deviceProps.maxTexture2D[1] = info.image2DMaxHeight_;