Take into an account the number of channels...

when querying the element size of an array.

Change-Id: Id57d3374b14d80a59230ec8286704f2fbabb0fae
This commit is contained in:
Vladislav Sytchenko authored and Vladislav Sytchenko committed 2020-04-03 15:43:18 -04:00
1 vanhempi fad9e39597
commit 5f14ae1161
3 files changed
+17 -17

No files matched your search

+2 -2
Näytä tiedosto
@@ -207,8 +207,8 @@ hipError_t ihipCreateTextureObject(hipTextureObject_t* pTexObject,
hipTextureReadMode readMode = pTexDesc->readMode;
// 32-bit integer format will not be promoted, regardless of whether or not
// this hipTextureDesc::readMode is set hipReadModeNormalizedFloat is specified.
if ((hip::getElementSize(pResDesc->res.array.array->Format) == 4) &&
(pResDesc->res.array.array->Format != HIP_AD_FORMAT_FLOAT)) {
if ((pResDesc->res.array.array->Format == HIP_AD_FORMAT_SIGNED_INT32) ||
(pResDesc->res.array.array->Format == HIP_AD_FORMAT_UNSIGNED_INT32)) {
readMode = hipReadModeElementType;
}