Update nvtt to use icbc library.
parent
daff42781d
commit
a671567596
@ -1,63 +1,63 @@
|
||||
PROJECT(nvtt)
|
||||
|
||||
ADD_SUBDIRECTORY(squish)
|
||||
|
||||
SET(NVTT_SRCS
|
||||
nvtt.h nvtt.cpp
|
||||
nvtt_wrapper.h nvtt_wrapper.cpp
|
||||
ClusterFit.h ClusterFit.cpp
|
||||
Compressor.h
|
||||
BlockCompressor.h BlockCompressor.cpp
|
||||
CompressorDX9.h CompressorDX9.cpp
|
||||
CompressorDX10.h CompressorDX10.cpp
|
||||
CompressorDX11.h CompressorDX11.cpp
|
||||
CompressorDXT1.h CompressorDXT1.cpp
|
||||
CompressorDXT5_RGBM.h CompressorDXT5_RGBM.cpp
|
||||
CompressorETC.h CompressorETC.cpp
|
||||
CompressorRGB.h CompressorRGB.cpp
|
||||
Context.h Context.cpp
|
||||
QuickCompressDXT.h QuickCompressDXT.cpp
|
||||
OptimalCompressDXT.h OptimalCompressDXT.cpp
|
||||
SingleColorLookup.h SingleColorLookup.cpp
|
||||
CompressionOptions.h CompressionOptions.cpp
|
||||
InputOptions.h InputOptions.cpp
|
||||
OutputOptions.h OutputOptions.cpp
|
||||
TaskDispatcher.h #TaskDispatcher.cpp
|
||||
Surface.h Surface.cpp
|
||||
CubeSurface.h CubeSurface.cpp
|
||||
cuda/CudaUtils.h cuda/CudaUtils.cpp
|
||||
cuda/CudaMath.h
|
||||
cuda/BitmapTable.h
|
||||
cuda/CudaCompressorDXT.h cuda/CudaCompressorDXT.cpp)
|
||||
|
||||
IF (CUDA_FOUND)
|
||||
ADD_DEFINITIONS(-DHAVE_CUDA)
|
||||
CUDA_COMPILE(CUDA_SRCS cuda/CompressKernel.cu)
|
||||
SET(NVTT_SRCS ${NVTT_SRCS} ${CUDA_SRCS})
|
||||
SET(LIBS ${LIBS} ${CUDA_LIBRARIES})
|
||||
INCLUDE_DIRECTORIES(${CUDA_INCLUDE_DIRS})
|
||||
ENDIF (CUDA_FOUND)
|
||||
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
INCLUDE_DIRECTORIES(${NV_SOURCE_DIR}/extern/rg_etc1_v104)
|
||||
|
||||
ADD_DEFINITIONS(-DNVTT_EXPORTS)
|
||||
|
||||
IF(NVTT_SHARED)
|
||||
ADD_LIBRARY(nvtt SHARED ${NVTT_SRCS})
|
||||
ELSE(NVTT_SHARED)
|
||||
ADD_LIBRARY(nvtt ${NVTT_SRCS})
|
||||
ENDIF(NVTT_SHARED)
|
||||
|
||||
TARGET_LINK_LIBRARIES(nvtt ${LIBS} nvcore nvimage nvthread nvsquish bc6h bc7 nvmath rg_etc1)
|
||||
|
||||
INSTALL(TARGETS nvtt
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib/static)
|
||||
|
||||
INSTALL(FILES nvtt.h nvtt_wrapper.h DESTINATION include/nvtt)
|
||||
|
||||
|
||||
ADD_SUBDIRECTORY(tools)
|
||||
ADD_SUBDIRECTORY(tests)
|
||||
PROJECT(nvtt)
|
||||
|
||||
ADD_SUBDIRECTORY(squish)
|
||||
|
||||
SET(NVTT_SRCS
|
||||
nvtt.h nvtt.cpp
|
||||
nvtt_wrapper.h nvtt_wrapper.cpp
|
||||
ClusterFit.h ClusterFit.cpp
|
||||
Compressor.h
|
||||
BlockCompressor.h BlockCompressor.cpp
|
||||
CompressorDX9.h CompressorDX9.cpp
|
||||
CompressorDX10.h CompressorDX10.cpp
|
||||
CompressorDX11.h CompressorDX11.cpp
|
||||
icbc.h icbc.cpp
|
||||
CompressorDXT5_RGBM.h CompressorDXT5_RGBM.cpp
|
||||
CompressorETC.h CompressorETC.cpp
|
||||
CompressorRGB.h CompressorRGB.cpp
|
||||
Context.h Context.cpp
|
||||
QuickCompressDXT.h QuickCompressDXT.cpp
|
||||
OptimalCompressDXT.h OptimalCompressDXT.cpp
|
||||
SingleColorLookup.h SingleColorLookup.cpp
|
||||
CompressionOptions.h CompressionOptions.cpp
|
||||
InputOptions.h InputOptions.cpp
|
||||
OutputOptions.h OutputOptions.cpp
|
||||
TaskDispatcher.h #TaskDispatcher.cpp
|
||||
Surface.h Surface.cpp
|
||||
CubeSurface.h CubeSurface.cpp
|
||||
cuda/CudaUtils.h cuda/CudaUtils.cpp
|
||||
cuda/CudaMath.h
|
||||
cuda/BitmapTable.h
|
||||
cuda/CudaCompressorDXT.h cuda/CudaCompressorDXT.cpp)
|
||||
|
||||
IF (CUDA_FOUND)
|
||||
ADD_DEFINITIONS(-DHAVE_CUDA)
|
||||
CUDA_COMPILE(CUDA_SRCS cuda/CompressKernel.cu)
|
||||
SET(NVTT_SRCS ${NVTT_SRCS} ${CUDA_SRCS})
|
||||
SET(LIBS ${LIBS} ${CUDA_LIBRARIES})
|
||||
INCLUDE_DIRECTORIES(${CUDA_INCLUDE_DIRS})
|
||||
ENDIF (CUDA_FOUND)
|
||||
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
INCLUDE_DIRECTORIES(${NV_SOURCE_DIR}/extern/rg_etc1_v104)
|
||||
|
||||
ADD_DEFINITIONS(-DNVTT_EXPORTS)
|
||||
|
||||
IF(NVTT_SHARED)
|
||||
ADD_LIBRARY(nvtt SHARED ${NVTT_SRCS})
|
||||
ELSE(NVTT_SHARED)
|
||||
ADD_LIBRARY(nvtt ${NVTT_SRCS})
|
||||
ENDIF(NVTT_SHARED)
|
||||
|
||||
TARGET_LINK_LIBRARIES(nvtt ${LIBS} nvcore nvimage nvthread nvsquish bc6h bc7 nvmath rg_etc1)
|
||||
|
||||
INSTALL(TARGETS nvtt
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib/static)
|
||||
|
||||
INSTALL(FILES nvtt.h nvtt_wrapper.h DESTINATION include/nvtt)
|
||||
|
||||
|
||||
ADD_SUBDIRECTORY(tools)
|
||||
ADD_SUBDIRECTORY(tests)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,29 +0,0 @@
|
||||
|
||||
namespace nv {
|
||||
|
||||
struct BlockDXT1;
|
||||
class Vector3;
|
||||
class Vector4;
|
||||
|
||||
void init_dxt1();
|
||||
|
||||
// All these functions return MSE.
|
||||
|
||||
float compress_dxt1_single_color(const Vector3 * colors, const float * weights, int count, const Vector3 & color_weights, BlockDXT1 * output);
|
||||
//float compress_dxt1_least_squares_fit(const Vector4 input_colors[16], const Vector3 * colors, const float * weights, int count, const Vector3 & color_weights, BlockDXT1 * output);
|
||||
float compress_dxt1_bounding_box_exhaustive(const Vector4 input_colors[16], const Vector3 * colors, const float * weights, int count, const Vector3 & color_weights, bool three_color_mode, int search_limit, BlockDXT1 * output);
|
||||
void compress_dxt1_cluster_fit(const Vector4 input_colors[16], const Vector3 * colors, const float * weights, int count, const Vector3 & color_weights, bool three_color_mode, BlockDXT1 * output);
|
||||
|
||||
// Cluster fit end point selection.
|
||||
float compress_dxt1(const Vector4 input_colors[16], const float input_weights[16], const Vector3 & color_weights, bool three_color_mode, bool hq, BlockDXT1 * output);
|
||||
|
||||
// Quick end point selection followed by least squares refinement.
|
||||
float compress_dxt1_fast(const Vector4 input_colors[16], const float input_weights[16], const Vector3 & color_weights, BlockDXT1 * output);
|
||||
|
||||
// @@ Change these interfaces to take a pitch argument instead of assuming (4*4), just like CMP_Core.
|
||||
void compress_dxt1_fast2(const unsigned char input_colors[16*4], BlockDXT1 * output);
|
||||
void compress_dxt1_fast_geld(const unsigned char input_colors[16 * 4], BlockDXT1 * output);
|
||||
|
||||
float evaluate_dxt1_error(const unsigned char rgba_block[16 * 4], const BlockDXT1 * block, int decoder = 0);
|
||||
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
#define ICBC_IMPLEMENTATION
|
||||
#include "icbc.h"
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue