diff --git a/hipamd/include/hip/nvidia_detail/nvidia_hip_runtime_api.h b/hipamd/include/hip/nvidia_detail/nvidia_hip_runtime_api.h index ebd5f501a7..b88548630a 100644 --- a/hipamd/include/hip/nvidia_detail/nvidia_hip_runtime_api.h +++ b/hipamd/include/hip/nvidia_detail/nvidia_hip_runtime_api.h @@ -281,6 +281,43 @@ typedef enum cudaMemRangeAttribute hipMemRangeAttribute; // // hipErrorNoDevice. +// hipResourceViewFormat +typedef enum cudaResourceViewFormat hipResourceViewFormat; +#define hipResViewFormatNone cudaResViewFormatNone +#define hipResViewFormatUnsignedChar1 cudaResViewFormatUnsignedChar1 +#define hipResViewFormatUnsignedChar2 cudaResViewFormatUnsignedChar2 +#define hipResViewFormatUnsignedChar4 cudaResViewFormatUnsignedChar4 +#define hipResViewFormatSignedChar1 cudaResViewFormatSignedChar1 +#define hipResViewFormatSignedChar2 cudaResViewFormatSignedChar2 +#define hipResViewFormatSignedChar4 cudaResViewFormatSignedChar4 +#define hipResViewFormatUnsignedShort1 cudaResViewFormatUnsignedShort1 +#define hipResViewFormatUnsignedShort2 cudaResViewFormatUnsignedShort2 +#define hipResViewFormatUnsignedShort4 cudaResViewFormatUnsignedShort4 +#define hipResViewFormatSignedShort1 cudaResViewFormatSignedShort1 +#define hipResViewFormatSignedShort2 cudaResViewFormatSignedShort2 +#define hipResViewFormatSignedShort4 cudaResViewFormatSignedShort4 +#define hipResViewFormatUnsignedInt1 cudaResViewFormatUnsignedInt1 +#define hipResViewFormatUnsignedInt2 cudaResViewFormatUnsignedInt2 +#define hipResViewFormatUnsignedInt4 cudaResViewFormatUnsignedInt4 +#define hipResViewFormatSignedInt1 cudaResViewFormatSignedInt1 +#define hipResViewFormatSignedInt2 cudaResViewFormatSignedInt2 +#define hipResViewFormatSignedInt4 cudaResViewFormatSignedInt4 +#define hipResViewFormatHalf1 cudaResViewFormatHalf1 +#define hipResViewFormatHalf2 cudaResViewFormatHalf2 +#define hipResViewFormatHalf4 cudaResViewFormatHalf4 +#define hipResViewFormatFloat1 cudaResViewFormatFloat1 +#define hipResViewFormatFloat2 cudaResViewFormatFloat2 +#define hipResViewFormatFloat4 cudaResViewFormatFloat4 +#define hipResViewFormatUnsignedBlockCompressed1 cudaResViewFormatUnsignedBlockCompressed1 +#define hipResViewFormatUnsignedBlockCompressed2 cudaResViewFormatUnsignedBlockCompressed2 +#define hipResViewFormatUnsignedBlockCompressed3 cudaResViewFormatUnsignedBlockCompressed3 +#define hipResViewFormatUnsignedBlockCompressed4 cudaResViewFormatUnsignedBlockCompressed4 +#define hipResViewFormatSignedBlockCompressed4 cudaResViewFormatSignedBlockCompressed4 +#define hipResViewFormatUnsignedBlockCompressed5 cudaResViewFormatUnsignedBlockCompressed5 +#define hipResViewFormatSignedBlockCompressed5 cudaResViewFormatSignedBlockCompressed5 +#define hipResViewFormatUnsignedBlockCompressed6H cudaResViewFormatUnsignedBlockCompressed6H +#define hipResViewFormatSignedBlockCompressed6H cudaResViewFormatSignedBlockCompressed6H +#define hipResViewFormatUnsignedBlockCompressed7 cudaResViewFormatUnsignedBlockCompressed7 //! Flags that can be used with hipEventCreateWithFlags: #define hipEventDefault cudaEventDefault diff --git a/hipamd/src/hip_texture.cpp b/hipamd/src/hip_texture.cpp index 34e9787300..6fbc087141 100644 --- a/hipamd/src/hip_texture.cpp +++ b/hipamd/src/hip_texture.cpp @@ -88,9 +88,7 @@ hipError_t ihipCreateTextureObject(hipTextureObject_t* pTexObject, return hipErrorInvalidValue; } - // pResViewDesc can only be specified if the type of resource is a HIP array or a HIP mipmapped array. - if ((pResViewDesc != nullptr) && - ((pResDesc->resType != hipResourceTypeArray) && (pResDesc->resType != hipResourceTypeMipmappedArray))) { + if (pResViewDesc != nullptr && pResDesc->resType == hipResourceTypeLinear) { return hipErrorInvalidValue; }