From 6f28642282cacef7d10ea08f1ffe5bec92bfbf3a Mon Sep 17 00:00:00 2001 From: castano Date: Fri, 1 Feb 2008 19:51:54 +0000 Subject: [PATCH] Set useCuda if CUDA enabled in Compression class. --- src/nvtt/CompressionOptions.h | 2 +- src/nvtt/nvtt.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/nvtt/CompressionOptions.h b/src/nvtt/CompressionOptions.h index d9caba8..a340cda 100644 --- a/src/nvtt/CompressionOptions.h +++ b/src/nvtt/CompressionOptions.h @@ -46,7 +46,7 @@ namespace nvtt uint bmask; uint amask; - bool useCuda; + mutable bool useCuda; nv::String externalCompressor; diff --git a/src/nvtt/nvtt.cpp b/src/nvtt/nvtt.cpp index f961c62..c8c54f9 100644 --- a/src/nvtt/nvtt.cpp +++ b/src/nvtt/nvtt.cpp @@ -673,6 +673,9 @@ static bool compress(const InputOptions::Private & inputOptions, const OutputOpt /// Compress the input texture with the given compression options. bool Compressor::process(const InputOptions & inputOptions, const CompressionOptions & compressionOptions, const OutputOptions & outputOptions) const { + // @@ Hack! + compressionOptions.m.useCuda = this->m.cudaEnabled; + return ::compress(inputOptions.m, outputOptions.m, compressionOptions.m); }