diff --git a/renderdoc/common/dds_readwrite.cpp b/renderdoc/common/dds_readwrite.cpp index 4625c5d03..bf9a0c54b 100644 --- a/renderdoc/common/dds_readwrite.cpp +++ b/renderdoc/common/dds_readwrite.cpp @@ -774,7 +774,8 @@ bool write_dds_to_file(FILE *f, const write_dds_data &data) (data.format.type == ResourceFormatType::BC1 || data.format.type == ResourceFormatType::BC4) ? 8 : 16; - header.dwPitchOrLinearSize = RDCMAX(1U, ((header.dwWidth + 3) / 4)) * blockSize; + header.dwPitchOrLinearSize = + RDCMAX(1U, ((header.dwWidth + 3) / 4)) * blockSize * RDCMAX(1U, data.height / 4); } else {