From 02641f4f439d1daaa2fe6f8a9ae49c2750070426 Mon Sep 17 00:00:00 2001 From: Vlad Sytchenko Date: Thu, 18 Jun 2020 12:56:25 -0400 Subject: [PATCH] Correct texture element size calculations hipChannelFormatDesc contains size of each channel in bits. There's 8 bits per byte, not 4, so we should divide by 8. Change-Id: I38ae2d28ad54740823c98908ca2afecad0ba0183 [ROCm/clr commit: 81b15ed36e74b639a896c13188ced8765fed2256] --- projects/clr/hipamd/rocclr/hip_conversions.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/clr/hipamd/rocclr/hip_conversions.hpp b/projects/clr/hipamd/rocclr/hip_conversions.hpp index 2a78617ad9..8838d5010d 100644 --- a/projects/clr/hipamd/rocclr/hip_conversions.hpp +++ b/projects/clr/hipamd/rocclr/hip_conversions.hpp @@ -898,6 +898,6 @@ HIP_RESOURCE_VIEW_DESC getResourceViewDesc(const hipResourceViewDesc& resViewDes inline size_t getElementSize(const hipChannelFormatDesc &desc) { - return (desc.x / 4) * getNumChannels(desc); + return (desc.x / 8) * getNumChannels(desc); } };