mirror of
https://github.com/spnda/dds_image.git
synced 2026-01-10 15:29:28 +01:00
Trust dimension from DX10 header
This commit is contained in:
@@ -510,12 +510,12 @@ namespace dds {
|
||||
image->format = getFormatInfo(header);
|
||||
if (image->format == DXGI_FORMAT_UNKNOWN)
|
||||
return ReadResult::UnsupportedFormat;
|
||||
}
|
||||
|
||||
if (header->flags & HeaderFlags::Volume || header->caps2 & Caps2Flags::Cubemap) {
|
||||
image->dimension = Texture3D;
|
||||
} else {
|
||||
image->dimension = header->height > 1 ? Texture2D : Texture1D;
|
||||
if (header->flags & HeaderFlags::Volume || header->caps2 & Caps2Flags::Cubemap) {
|
||||
image->dimension = Texture3D;
|
||||
} else {
|
||||
image->dimension = header->height > 1 ? Texture2D : Texture1D;
|
||||
}
|
||||
}
|
||||
|
||||
const auto blockSizeBytes = getBlockSize(image->format);
|
||||
|
||||
Reference in New Issue
Block a user