From 2a0097553c173e1fe585f148f70a3996fb2c4761 Mon Sep 17 00:00:00 2001 From: RSDuck Date: Thu, 8 Jul 2021 22:33:47 +0200 Subject: [PATCH] Fix #10 --- source/dk_image.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/source/dk_image.cpp b/source/dk_image.cpp index 430ee05..bda8ffc 100644 --- a/source/dk_image.cpp +++ b/source/dk_image.cpp @@ -437,16 +437,14 @@ void dkImageLayoutInitialize(DkImageLayout* obj, DkImageLayoutMaker const* maker uint32_t actualHeight = obj->m_dimensions[1] * obj->m_samplesY; if (obj->m_blockH > 1) actualHeight = adjustBlockSize(actualHeight, obj->m_blockH); - uint32_t heightAndHalf = actualHeight + actualHeight/2; - uint32_t heightAndHalfInGobs = (heightAndHalf + 7) / 8; // remember, one gob is 8 rows tall - obj->m_tileH = pickTileSize(heightAndHalfInGobs); + uint32_t heightInGobs = (actualHeight + 7) / 8; // remember, one gob is 8 rows tall + obj->m_tileH = pickTileSize(heightInGobs); } else if (obj->m_dimsPerLayer == 3) { // Calculate actual depth, and multiply it by 1.5 uint32_t actualDepth = obj->m_dimensions[2]; - uint32_t depthAndHalf = actualDepth + actualDepth/2; - obj->m_tileD = pickTileSize(depthAndHalf); + obj->m_tileD = pickTileSize(actualDepth); } }