Skip to content

Commit aec0784

Browse files
authored
--ignore-mips does not apply to array textures (#567)
1 parent 5864794 commit aec0784

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

DirectXTex/DirectXTexDDS.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ namespace
378378
}
379379

380380
metadata.mipLevels = pHeader->mipMapCount;
381-
if ((metadata.mipLevels == 0) || (flags & DDS_FLAGS_IGNORE_MIPS))
381+
if (metadata.mipLevels == 0)
382382
{
383383
metadata.mipLevels = 1;
384384
}
@@ -650,6 +650,12 @@ namespace
650650
}
651651
}
652652

653+
// Special-handling flag for ignoring mipchains on simple DDS files
654+
if ((flags & DDS_FLAGS_IGNORE_MIPS) && (metadata.arraySize == 1))
655+
{
656+
metadata.mipLevels = 1;
657+
}
658+
653659
// Handle DDS-specific metadata
654660
if (ddPixelFormat)
655661
{

0 commit comments

Comments
 (0)