|
|
|
@ -186,15 +186,15 @@ static bool compressMipmap(const Image * image, const OutputOptions & outputOpti
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
#endif
|
|
|
|
|
if (compressionOptions.useCuda && nv::cuda::isHardwarePresent())
|
|
|
|
|
if (compressionOptions.quality == Quality_Fastest)
|
|
|
|
|
{
|
|
|
|
|
cudaCompressDXT1(image, outputOptions, compressionOptions);
|
|
|
|
|
fastCompressDXT1(image, outputOptions);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (compressionOptions.quality == Quality_Fastest)
|
|
|
|
|
if (compressionOptions.useCuda && nv::cuda::isHardwarePresent())
|
|
|
|
|
{
|
|
|
|
|
fastCompressDXT1(image, outputOptions);
|
|
|
|
|
cudaCompressDXT1(image, outputOptions, compressionOptions);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -209,10 +209,17 @@ static bool compressMipmap(const Image * image, const OutputOptions & outputOpti
|
|
|
|
|
fastCompressDXT3(image, outputOptions);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (compressionOptions.useCuda && nv::cuda::isHardwarePresent())
|
|
|
|
|
{
|
|
|
|
|
cudaCompressDXT3(image, outputOptions, compressionOptions);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
compressDXT3(image, outputOptions, compressionOptions);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (compressionOptions.format == Format_DXT5)
|
|
|
|
|
{
|
|
|
|
|
if (compressionOptions.quality == Quality_Fastest)
|
|
|
|
@ -220,10 +227,17 @@ static bool compressMipmap(const Image * image, const OutputOptions & outputOpti
|
|
|
|
|
fastCompressDXT5(image, outputOptions);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (compressionOptions.useCuda && nv::cuda::isHardwarePresent())
|
|
|
|
|
{
|
|
|
|
|
cudaCompressDXT5(image, outputOptions, compressionOptions);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
compressDXT5(image, outputOptions, compressionOptions);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (compressionOptions.format == Format_DXT5n)
|
|
|
|
|
{
|
|
|
|
|
if (compressionOptions.quality == Quality_Fastest)
|
|
|
|
|