mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Fix calculation of number of rows in block DDS formats. Closes #1870
* The number of rows should be the ceiling of the 4-row number, since any overlap becomes a whole extra row of blocks.
This commit is contained in:
@@ -1131,7 +1131,7 @@ dds_data load_dds_from_file(StreamReader *reader)
|
||||
// pitch/rows are in blocks, not pixels, for block formats.
|
||||
if(blockFormat)
|
||||
{
|
||||
numRows = RDCMAX(1U, numRows / 4);
|
||||
numRows = RDCMAX(1U, (numRows + 3) / 4);
|
||||
|
||||
uint32_t blockSize = (ret.format.type == ResourceFormatType::BC1 ||
|
||||
ret.format.type == ResourceFormatType::BC4)
|
||||
|
||||
Reference in New Issue
Block a user