--ignore-mips does not apply to array textures (#567)

This commit is contained in:
Chuck Walbourn 2024-12-16 10:53:49 -08:00 committed by GitHub
parent 5864794ee6
commit aec0784730
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -378,7 +378,7 @@ namespace
} }
metadata.mipLevels = pHeader->mipMapCount; metadata.mipLevels = pHeader->mipMapCount;
if ((metadata.mipLevels == 0) || (flags & DDS_FLAGS_IGNORE_MIPS)) if (metadata.mipLevels == 0)
{ {
metadata.mipLevels = 1; metadata.mipLevels = 1;
} }
@ -650,6 +650,12 @@ namespace
} }
} }
// Special-handling flag for ignoring mipchains on simple DDS files
if ((flags & DDS_FLAGS_IGNORE_MIPS) && (metadata.arraySize == 1))
{
metadata.mipLevels = 1;
}
// Handle DDS-specific metadata // Handle DDS-specific metadata
if (ddPixelFormat) if (ddPixelFormat)
{ {