From c5f60e51ac44b089d4ecd939ef1db34b75b1831d Mon Sep 17 00:00:00 2001 From: Tao Sang Date: Thu, 30 Jun 2022 17:23:24 -0400 Subject: [PATCH] SWDEV-327502 Disable 3D linear filter on Mi200 Change-Id: I3f79fb4f3a59cd7335c5ca2363cf1659a0a7f6aa [ROCm/clr commit: 2a91d45704eda5114392ef1014a845444e756b51] --- projects/clr/hipamd/src/hip_texture.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/projects/clr/hipamd/src/hip_texture.cpp b/projects/clr/hipamd/src/hip_texture.cpp index 8ae5c2abdf..289bb84f8a 100644 --- a/projects/clr/hipamd/src/hip_texture.cpp +++ b/projects/clr/hipamd/src/hip_texture.cpp @@ -96,10 +96,16 @@ hipError_t ihipCreateTextureObject(hipTextureObject_t* pTexObject, } // If hipResourceDesc::resType is set to hipResourceTypeArray, - // hipResourceDesc::res::array::array must be set to a valid HIP array handle. - if ((pResDesc->resType == hipResourceTypeArray) && - (pResDesc->res.array.array == nullptr)) { - return hipErrorInvalidValue; + if (pResDesc->resType == hipResourceTypeArray) { + // hipResourceDesc::res::array::array must be set to a valid HIP array handle. + if (pResDesc->res.array.array == nullptr) { + return hipErrorInvalidValue; + } else if (pResDesc->res.array.array->depth > 0 && + pTexDesc->filterMode == hipFilterModeLinear && + !strncmp(info.name_, "gfx90a", strlen("gfx90a"))) { + LogPrintfInfo("%s doesn't support 3D linear filter!", info.name_); + return hipErrorNotSupported; + } } // If hipResourceDesc::resType is set to hipResourceTypeMipmappedArray,