More cleanup.
This commit is contained in:
parent
c8bf853ba4
commit
4b08c20b0e
@ -1,6 +1,8 @@
|
|||||||
PROJECT(nvtt)
|
PROJECT(nvtt)
|
||||||
|
|
||||||
ADD_SUBDIRECTORY(squish)
|
ADD_SUBDIRECTORY(squish)
|
||||||
|
ADD_SUBDIRECTORY(bc6h)
|
||||||
|
#ADD_SUBDIRECTORY(bc7)
|
||||||
|
|
||||||
SET(NVTT_SRCS
|
SET(NVTT_SRCS
|
||||||
nvtt.h
|
nvtt.h
|
||||||
@ -12,6 +14,10 @@ SET(NVTT_SRCS
|
|||||||
Compressor.h
|
Compressor.h
|
||||||
CompressorDXT.h
|
CompressorDXT.h
|
||||||
CompressorDXT.cpp
|
CompressorDXT.cpp
|
||||||
|
CompressorDX10.h
|
||||||
|
CompressorDX10.cpp
|
||||||
|
CompressorDX11.h
|
||||||
|
CompressorDX11.cpp
|
||||||
CompressorRGB.h
|
CompressorRGB.h
|
||||||
CompressorRGB.cpp
|
CompressorRGB.cpp
|
||||||
CompressorRGBE.h
|
CompressorRGBE.h
|
||||||
|
@ -21,11 +21,11 @@
|
|||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
#ifndef NV_TT_COMPRESSOR_H
|
#ifndef NVTT_COMPRESSOR_H
|
||||||
#define NV_TT_COMPRESSOR_H
|
#define NVTT_COMPRESSOR_H
|
||||||
|
|
||||||
#include <nvcore/nvcore.h> // uint
|
|
||||||
#include "nvtt.h"
|
#include "nvtt.h"
|
||||||
|
#include "nvcore/nvcore.h" // uint
|
||||||
|
|
||||||
namespace nv
|
namespace nv
|
||||||
{
|
{
|
||||||
@ -37,4 +37,4 @@ namespace nv
|
|||||||
|
|
||||||
} // nv namespace
|
} // nv namespace
|
||||||
|
|
||||||
#endif // NV_TT_COMPRESSOR_H
|
#endif // NVTT_COMPRESSOR_H
|
||||||
|
78
src/nvtt/CompressorDX10.cpp
Normal file
78
src/nvtt/CompressorDX10.cpp
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
// Copyright NVIDIA Corporation 2007 -- Ignacio Castano <icastano@nvidia.com>
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person
|
||||||
|
// obtaining a copy of this software and associated documentation
|
||||||
|
// files (the "Software"), to deal in the Software without
|
||||||
|
// restriction, including without limitation the rights to use,
|
||||||
|
// copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
// copies of the Software, and to permit persons to whom the
|
||||||
|
// Software is furnished to do so, subject to the following
|
||||||
|
// conditions:
|
||||||
|
//
|
||||||
|
// The above copyright notice and this permission notice shall be
|
||||||
|
// included in all copies or substantial portions of the Software.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||||
|
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||||
|
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
#include "CompressorDX10.h"
|
||||||
|
#include "QuickCompressDXT.h"
|
||||||
|
#include "OptimalCompressDXT.h"
|
||||||
|
|
||||||
|
#include "nvtt.h"
|
||||||
|
|
||||||
|
#include "nvimage/ColorBlock.h"
|
||||||
|
#include "nvimage/BlockDXT.h"
|
||||||
|
|
||||||
|
#include <new> // placement new
|
||||||
|
|
||||||
|
using namespace nv;
|
||||||
|
using namespace nvtt;
|
||||||
|
|
||||||
|
|
||||||
|
void FastCompressorBC4::compressBlock(ColorBlock & rgba, nvtt::AlphaMode alphaMode, const nvtt::CompressionOptions::Private & compressionOptions, void * output)
|
||||||
|
{
|
||||||
|
BlockATI1 * block = new(output) BlockATI1;
|
||||||
|
|
||||||
|
rgba.swizzle(0, 1, 2, 0); // Copy red to alpha
|
||||||
|
QuickCompress::compressDXT5A(rgba, &block->alpha);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FastCompressorBC5::compressBlock(ColorBlock & rgba, nvtt::AlphaMode alphaMode, const nvtt::CompressionOptions::Private & compressionOptions, void * output)
|
||||||
|
{
|
||||||
|
BlockATI2 * block = new(output) BlockATI2;
|
||||||
|
|
||||||
|
rgba.swizzle(0, 1, 2, 0); // Copy red to alpha
|
||||||
|
QuickCompress::compressDXT5A(rgba, &block->x);
|
||||||
|
|
||||||
|
rgba.swizzle(0, 1, 2, 1); // Copy green to alpha
|
||||||
|
QuickCompress::compressDXT5A(rgba, &block->y);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ProductionCompressorBC4::compressBlock(ColorBlock & rgba, nvtt::AlphaMode alphaMode, const nvtt::CompressionOptions::Private & compressionOptions, void * output)
|
||||||
|
{
|
||||||
|
BlockATI1 * block = new(output) BlockATI1;
|
||||||
|
|
||||||
|
rgba.swizzle(0, 1, 2, 0); // Copy red to alpha
|
||||||
|
OptimalCompress::compressDXT5A(rgba, &block->alpha);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ProductionCompressorBC5::compressBlock(ColorBlock & rgba, nvtt::AlphaMode alphaMode, const nvtt::CompressionOptions::Private & compressionOptions, void * output)
|
||||||
|
{
|
||||||
|
BlockATI2 * block = new(output) BlockATI2;
|
||||||
|
|
||||||
|
rgba.swizzle(0, 1, 2, 0); // Copy red to alpha
|
||||||
|
OptimalCompress::compressDXT5A(rgba, &block->x);
|
||||||
|
|
||||||
|
rgba.swizzle(0, 1, 2, 1); // Copy green to alpha
|
||||||
|
OptimalCompress::compressDXT5A(rgba, &block->y);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
63
src/nvtt/CompressorDX10.h
Normal file
63
src/nvtt/CompressorDX10.h
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
// Copyright NVIDIA Corporation 2007 -- Ignacio Castano <icastano@nvidia.com>
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person
|
||||||
|
// obtaining a copy of this software and associated documentation
|
||||||
|
// files (the "Software"), to deal in the Software without
|
||||||
|
// restriction, including without limitation the rights to use,
|
||||||
|
// copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
// copies of the Software, and to permit persons to whom the
|
||||||
|
// Software is furnished to do so, subject to the following
|
||||||
|
// conditions:
|
||||||
|
//
|
||||||
|
// The above copyright notice and this permission notice shall be
|
||||||
|
// included in all copies or substantial portions of the Software.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||||
|
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||||
|
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
#ifndef NVTT_COMPRESSORDX10_H
|
||||||
|
#define NVTT_COMPRESSORDX10_H
|
||||||
|
|
||||||
|
#include "CompressorDXT.h"
|
||||||
|
|
||||||
|
namespace nv
|
||||||
|
{
|
||||||
|
struct ColorBlock;
|
||||||
|
|
||||||
|
// Fast CPU compressors.
|
||||||
|
struct FastCompressorBC4 : public FixedBlockCompressor
|
||||||
|
{
|
||||||
|
virtual void compressBlock(ColorBlock & rgba, nvtt::AlphaMode alphaMode, const nvtt::CompressionOptions::Private & compressionOptions, void * output);
|
||||||
|
virtual uint blockSize() const { return 8; }
|
||||||
|
};
|
||||||
|
|
||||||
|
struct FastCompressorBC5 : public FixedBlockCompressor
|
||||||
|
{
|
||||||
|
virtual void compressBlock(ColorBlock & rgba, nvtt::AlphaMode alphaMode, const nvtt::CompressionOptions::Private & compressionOptions, void * output);
|
||||||
|
virtual uint blockSize() const { return 16; }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Production CPU compressors.
|
||||||
|
struct ProductionCompressorBC4 : public FixedBlockCompressor
|
||||||
|
{
|
||||||
|
virtual void compressBlock(ColorBlock & rgba, nvtt::AlphaMode alphaMode, const nvtt::CompressionOptions::Private & compressionOptions, void * output);
|
||||||
|
virtual uint blockSize() const { return 8; }
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ProductionCompressorBC5 : public FixedBlockCompressor
|
||||||
|
{
|
||||||
|
virtual void compressBlock(ColorBlock & rgba, nvtt::AlphaMode alphaMode, const nvtt::CompressionOptions::Private & compressionOptions, void * output);
|
||||||
|
virtual uint blockSize() const { return 16; }
|
||||||
|
};
|
||||||
|
|
||||||
|
} // nv namespace
|
||||||
|
|
||||||
|
|
||||||
|
#endif // NVTT_COMPRESSORDX10_H
|
33
src/nvtt/CompressorDX11.cpp
Normal file
33
src/nvtt/CompressorDX11.cpp
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
// Copyright NVIDIA Corporation 2007 -- Ignacio Castano <icastano@nvidia.com>
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person
|
||||||
|
// obtaining a copy of this software and associated documentation
|
||||||
|
// files (the "Software"), to deal in the Software without
|
||||||
|
// restriction, including without limitation the rights to use,
|
||||||
|
// copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
// copies of the Software, and to permit persons to whom the
|
||||||
|
// Software is furnished to do so, subject to the following
|
||||||
|
// conditions:
|
||||||
|
//
|
||||||
|
// The above copyright notice and this permission notice shall be
|
||||||
|
// included in all copies or substantial portions of the Software.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||||
|
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||||
|
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
#include "CompressorDX11.h"
|
||||||
|
|
||||||
|
#include "nvtt.h"
|
||||||
|
|
||||||
|
using namespace nv;
|
||||||
|
using namespace nvtt;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
46
src/nvtt/CompressorDX11.h
Normal file
46
src/nvtt/CompressorDX11.h
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
// Copyright NVIDIA Corporation 2007 -- Ignacio Castano <icastano@nvidia.com>
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person
|
||||||
|
// obtaining a copy of this software and associated documentation
|
||||||
|
// files (the "Software"), to deal in the Software without
|
||||||
|
// restriction, including without limitation the rights to use,
|
||||||
|
// copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
// copies of the Software, and to permit persons to whom the
|
||||||
|
// Software is furnished to do so, subject to the following
|
||||||
|
// conditions:
|
||||||
|
//
|
||||||
|
// The above copyright notice and this permission notice shall be
|
||||||
|
// included in all copies or substantial portions of the Software.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||||
|
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||||
|
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
#ifndef NVTT_COMPRESSORDX11_H
|
||||||
|
#define NVTT_COMPRESSORDX11_H
|
||||||
|
|
||||||
|
#include "CompressorDXT.h"
|
||||||
|
|
||||||
|
namespace nv
|
||||||
|
{
|
||||||
|
struct CompressorBC6 : public FixedBlockCompressor
|
||||||
|
{
|
||||||
|
virtual void compressBlock(ColorBlock & rgba, nvtt::AlphaMode alphaMode, const nvtt::CompressionOptions::Private & compressionOptions, void * output);
|
||||||
|
virtual uint blockSize() const { return 16; }
|
||||||
|
};
|
||||||
|
|
||||||
|
struct CompressorBC7 : public FixedBlockCompressor
|
||||||
|
{
|
||||||
|
virtual void compressBlock(ColorBlock & rgba, nvtt::AlphaMode alphaMode, const nvtt::CompressionOptions::Private & compressionOptions, void * output);
|
||||||
|
virtual uint blockSize() const { return 16; }
|
||||||
|
};
|
||||||
|
|
||||||
|
} // nv namespace
|
||||||
|
|
||||||
|
|
||||||
|
#endif // NVTT_COMPRESSORDX11_H
|
@ -40,6 +40,7 @@
|
|||||||
#include "nvimage/ColorBlock.h"
|
#include "nvimage/ColorBlock.h"
|
||||||
#include "nvimage/BlockDXT.h"
|
#include "nvimage/BlockDXT.h"
|
||||||
|
|
||||||
|
#include <new> // placement new
|
||||||
|
|
||||||
// s3_quant
|
// s3_quant
|
||||||
#if defined(HAVE_S3QUANT)
|
#if defined(HAVE_S3QUANT)
|
||||||
@ -190,25 +191,6 @@ void FastCompressorDXT5n::compressBlock(ColorBlock & rgba, nvtt::AlphaMode alpha
|
|||||||
QuickCompress::compressDXT5(rgba, block);
|
QuickCompress::compressDXT5(rgba, block);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FastCompressorBC4::compressBlock(ColorBlock & rgba, nvtt::AlphaMode alphaMode, const nvtt::CompressionOptions::Private & compressionOptions, void * output)
|
|
||||||
{
|
|
||||||
BlockATI1 * block = new(output) BlockATI1;
|
|
||||||
|
|
||||||
rgba.swizzle(0, 1, 2, 0); // Copy red to alpha
|
|
||||||
QuickCompress::compressDXT5A(rgba, &block->alpha);
|
|
||||||
}
|
|
||||||
|
|
||||||
void FastCompressorBC5::compressBlock(ColorBlock & rgba, nvtt::AlphaMode alphaMode, const nvtt::CompressionOptions::Private & compressionOptions, void * output)
|
|
||||||
{
|
|
||||||
BlockATI2 * block = new(output) BlockATI2;
|
|
||||||
|
|
||||||
rgba.swizzle(0, 1, 2, 0); // Copy red to alpha
|
|
||||||
QuickCompress::compressDXT5A(rgba, &block->x);
|
|
||||||
|
|
||||||
rgba.swizzle(0, 1, 2, 1); // Copy green to alpha
|
|
||||||
QuickCompress::compressDXT5A(rgba, &block->y);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void NormalCompressorDXT1::compressBlock(ColorBlock & rgba, nvtt::AlphaMode alphaMode, const nvtt::CompressionOptions::Private & compressionOptions, void * output)
|
void NormalCompressorDXT1::compressBlock(ColorBlock & rgba, nvtt::AlphaMode alphaMode, const nvtt::CompressionOptions::Private & compressionOptions, void * output)
|
||||||
{
|
{
|
||||||
@ -367,27 +349,6 @@ void NormalCompressorDXT5n::compressBlock(ColorBlock & rgba, nvtt::AlphaMode alp
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ProductionCompressorBC4::compressBlock(ColorBlock & rgba, nvtt::AlphaMode alphaMode, const nvtt::CompressionOptions::Private & compressionOptions, void * output)
|
|
||||||
{
|
|
||||||
BlockATI1 * block = new(output) BlockATI1;
|
|
||||||
|
|
||||||
rgba.swizzle(0, 1, 2, 0); // Copy red to alpha
|
|
||||||
OptimalCompress::compressDXT5A(rgba, &block->alpha);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ProductionCompressorBC5::compressBlock(ColorBlock & rgba, nvtt::AlphaMode alphaMode, const nvtt::CompressionOptions::Private & compressionOptions, void * output)
|
|
||||||
{
|
|
||||||
BlockATI2 * block = new(output) BlockATI2;
|
|
||||||
|
|
||||||
rgba.swizzle(0, 1, 2, 0); // Copy red to alpha
|
|
||||||
OptimalCompress::compressDXT5A(rgba, &block->x);
|
|
||||||
|
|
||||||
rgba.swizzle(0, 1, 2, 1); // Copy green to alpha
|
|
||||||
OptimalCompress::compressDXT5A(rgba, &block->y);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(HAVE_S3QUANT)
|
#if defined(HAVE_S3QUANT)
|
||||||
|
|
||||||
void S3CompressorDXT1::compress(nvtt::InputFormat inputFormat, nvtt::AlphaMode alphaMode, uint w, uint h, void * data, const nvtt::CompressionOptions::Private & compressionOptions, const nvtt::OutputOptions::Private & outputOptions)
|
void S3CompressorDXT1::compress(nvtt::InputFormat inputFormat, nvtt::AlphaMode alphaMode, uint w, uint h, void * data, const nvtt::CompressionOptions::Private & compressionOptions, const nvtt::OutputOptions::Private & outputOptions)
|
||||||
|
@ -21,11 +21,9 @@
|
|||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
#ifndef NV_TT_COMPRESSORDXT_H
|
#ifndef NVTT_COMPRESSORDXT_H
|
||||||
#define NV_TT_COMPRESSORDXT_H
|
#define NVTT_COMPRESSORDXT_H
|
||||||
|
|
||||||
#include <nvcore/nvcore.h>
|
|
||||||
#include "nvtt.h"
|
|
||||||
#include "Compressor.h"
|
#include "Compressor.h"
|
||||||
|
|
||||||
namespace nv
|
namespace nv
|
||||||
@ -72,18 +70,6 @@ namespace nv
|
|||||||
virtual uint blockSize() const { return 16; }
|
virtual uint blockSize() const { return 16; }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FastCompressorBC4 : public FixedBlockCompressor
|
|
||||||
{
|
|
||||||
virtual void compressBlock(ColorBlock & rgba, nvtt::AlphaMode alphaMode, const nvtt::CompressionOptions::Private & compressionOptions, void * output);
|
|
||||||
virtual uint blockSize() const { return 8; }
|
|
||||||
};
|
|
||||||
|
|
||||||
struct FastCompressorBC5 : public FixedBlockCompressor
|
|
||||||
{
|
|
||||||
virtual void compressBlock(ColorBlock & rgba, nvtt::AlphaMode alphaMode, const nvtt::CompressionOptions::Private & compressionOptions, void * output);
|
|
||||||
virtual uint blockSize() const { return 16; }
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// Normal CPU compressors.
|
// Normal CPU compressors.
|
||||||
struct NormalCompressorDXT1 : public FixedBlockCompressor
|
struct NormalCompressorDXT1 : public FixedBlockCompressor
|
||||||
@ -117,20 +103,6 @@ namespace nv
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Production CPU compressors.
|
|
||||||
struct ProductionCompressorBC4 : public FixedBlockCompressor
|
|
||||||
{
|
|
||||||
virtual void compressBlock(ColorBlock & rgba, nvtt::AlphaMode alphaMode, const nvtt::CompressionOptions::Private & compressionOptions, void * output);
|
|
||||||
virtual uint blockSize() const { return 8; }
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ProductionCompressorBC5 : public FixedBlockCompressor
|
|
||||||
{
|
|
||||||
virtual void compressBlock(ColorBlock & rgba, nvtt::AlphaMode alphaMode, const nvtt::CompressionOptions::Private & compressionOptions, void * output);
|
|
||||||
virtual uint blockSize() const { return 16; }
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// External compressors.
|
// External compressors.
|
||||||
#if defined(HAVE_S3QUANT)
|
#if defined(HAVE_S3QUANT)
|
||||||
struct S3CompressorDXT1 : public CompressorInterface
|
struct S3CompressorDXT1 : public CompressorInterface
|
||||||
@ -176,4 +148,4 @@ namespace nv
|
|||||||
} // nv namespace
|
} // nv namespace
|
||||||
|
|
||||||
|
|
||||||
#endif // NV_TT_COMPRESSORDXT_H
|
#endif // NVTT_COMPRESSORDXT_H
|
||||||
|
@ -21,10 +21,9 @@
|
|||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
#ifndef NV_TT_COMPRESSORRGB_H
|
#ifndef NVTT_COMPRESSORRGB_H
|
||||||
#define NV_TT_COMPRESSORRGB_H
|
#define NVTT_COMPRESSORRGB_H
|
||||||
|
|
||||||
#include "nvtt.h"
|
|
||||||
#include "Compressor.h"
|
#include "Compressor.h"
|
||||||
|
|
||||||
namespace nv
|
namespace nv
|
||||||
@ -37,4 +36,4 @@ namespace nv
|
|||||||
} // nv namespace
|
} // nv namespace
|
||||||
|
|
||||||
|
|
||||||
#endif // NV_TT_COMPRESSORRGB_H
|
#endif // NVTT_COMPRESSORRGB_H
|
||||||
|
@ -21,10 +21,9 @@
|
|||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
#ifndef NV_TT_COMPRESSORRGBE_H
|
#ifndef NVTT_COMPRESSORRGBE_H
|
||||||
#define NV_TT_COMPRESSORRGBE_H
|
#define NVTT_COMPRESSORRGBE_H
|
||||||
|
|
||||||
#include "nvtt.h"
|
|
||||||
#include "Compressor.h"
|
#include "Compressor.h"
|
||||||
|
|
||||||
namespace nv
|
namespace nv
|
||||||
@ -37,4 +36,4 @@ namespace nv
|
|||||||
} // nv namespace
|
} // nv namespace
|
||||||
|
|
||||||
|
|
||||||
#endif // NV_TT_COMPRESSORRGBE_H
|
#endif // NVTT_COMPRESSORRGBE_H
|
||||||
|
@ -45,6 +45,8 @@
|
|||||||
#include "TexImage.h"
|
#include "TexImage.h"
|
||||||
|
|
||||||
#include "CompressorDXT.h"
|
#include "CompressorDXT.h"
|
||||||
|
#include "CompressorDX10.h"
|
||||||
|
#include "CompressorDX11.h"
|
||||||
#include "CompressorRGB.h"
|
#include "CompressorRGB.h"
|
||||||
#include "CompressorRGBE.h"
|
#include "CompressorRGBE.h"
|
||||||
#include "cuda/CudaUtils.h"
|
#include "cuda/CudaUtils.h"
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
#ifndef NV_TT_INPUTOPTIONS_H
|
#ifndef NVTT_INPUTOPTIONS_H
|
||||||
#define NV_TT_INPUTOPTIONS_H
|
#define NVTT_INPUTOPTIONS_H
|
||||||
|
|
||||||
#include <nvcore/Ptr.h>
|
#include <nvcore/Ptr.h>
|
||||||
#include <nvmath/Vector.h>
|
#include <nvmath/Vector.h>
|
||||||
@ -120,4 +120,4 @@ namespace nvtt
|
|||||||
|
|
||||||
} // nvtt namespace
|
} // nvtt namespace
|
||||||
|
|
||||||
#endif // NV_TT_INPUTOPTIONS_H
|
#endif // NVTT_INPUTOPTIONS_H
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
#ifndef NV_TT_TEXIMAGE_H
|
#ifndef NVTT_TEXIMAGE_H
|
||||||
#define NV_TT_TEXIMAGE_H
|
#define NVTT_TEXIMAGE_H
|
||||||
|
|
||||||
#include "nvtt.h"
|
#include "nvtt.h"
|
||||||
|
|
||||||
@ -78,4 +78,4 @@ namespace nvtt
|
|||||||
} // nvtt namespace
|
} // nvtt namespace
|
||||||
|
|
||||||
|
|
||||||
#endif // NV_TT_TEXIMAGE_H
|
#endif // NVTT_TEXIMAGE_H
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef NV_TT_H
|
#ifndef NVTT_H
|
||||||
#define NV_TT_H
|
#define NVTT_H
|
||||||
|
|
||||||
// Function linkage
|
// Function linkage
|
||||||
#if NVTT_SHARED
|
#if NVTT_SHARED
|
||||||
@ -474,4 +474,4 @@ namespace nvtt
|
|||||||
|
|
||||||
} // nvtt namespace
|
} // nvtt namespace
|
||||||
|
|
||||||
#endif // NV_TT_H
|
#endif // NVTT_H
|
||||||
|
@ -234,6 +234,6 @@ private:
|
|||||||
Sym3x3 ComputeWeightedCovariance( int n, Vec3 const* points, float const* weights, Vec3::Arg metric );
|
Sym3x3 ComputeWeightedCovariance( int n, Vec3 const* points, float const* weights, Vec3::Arg metric );
|
||||||
Vec3 ComputePrincipleComponent( Sym3x3 const& matrix );
|
Vec3 ComputePrincipleComponent( Sym3x3 const& matrix );
|
||||||
|
|
||||||
} // namespace squish
|
} // namespace nvsquish
|
||||||
|
|
||||||
#endif // ndef SQUISH_MATHS_H
|
#endif // ndef SQUISH_MATHS_H
|
||||||
|
Loading…
Reference in New Issue
Block a user