Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
RSDuck committed Dec 26, 2023
1 parent a51e762 commit 2a00975
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions source/dk_image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 2a00975

Please sign in to comment.