From 224334e1d20bc44a36ea2f01d304429eb5bccfff Mon Sep 17 00:00:00 2001 From: Marko Arandjelovic Date: Thu, 8 Aug 2024 12:49:51 +0200 Subject: [PATCH] SWDEV-478206 - Fix hipTexRefSetArray Change-Id: I6bd6ce60163d4f79001fce75e40ef46f1fcb7c3f --- hipamd/src/hip_texture.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hipamd/src/hip_texture.cpp b/hipamd/src/hip_texture.cpp index 89bade266e..ec83a12622 100644 --- a/hipamd/src/hip_texture.cpp +++ b/hipamd/src/hip_texture.cpp @@ -1004,6 +1004,11 @@ hipError_t hipTexRefSetArray(textureReference* texRef, HIP_RETURN(err); } + // If flag = HIP_TRSA_OVERRIDE_FORMAT, + // Override the texref format with a format inferred from the array + texRef->format = array->Format; + texRef->numChannels = array->NumChannels; + hipResourceDesc resDesc = {}; resDesc.resType = hipResourceTypeArray; resDesc.res.array.array = const_cast(array);