Fix some small bugs to hook into NVTT

This commit is contained in:
Pavel Krajcevski 2014-03-28 11:40:52 -04:00
parent fabf6830ee
commit ed2bcc3838
3 changed files with 8 additions and 7 deletions

View file

@ -62,4 +62,4 @@
#cmakedefine HAS_GCC_ATOMICS #cmakedefine HAS_GCC_ATOMICS
#cmakedefine HAS_MSVC_ATOMICS #cmakedefine HAS_MSVC_ATOMICS
#cmakedefine FOUND_NVTT_BC7_EXPORT #cmakedefine FOUND_NVTT_BPTC_EXPORT

View file

@ -50,8 +50,8 @@
* <http://gamma.cs.unc.edu/FasTC/> * <http://gamma.cs.unc.edu/FasTC/>
*/ */
#include "BC7Compressor.h" #include "BPTCCompressor.h"
#include "BC7CompressionMode.h" #include "CompressionMode.h"
#undef DBL_MAX #undef DBL_MAX
#include "BitStream.h" #include "BitStream.h"
#include "TexCompTypes.h" #include "TexCompTypes.h"
@ -62,7 +62,7 @@
#include "avpcl.h" #include "avpcl.h"
namespace BC7C { namespace BPTCC {
void GetBlock(uint32 x, uint32 y, uint32 width, const uint32 *pixels, Tile &t) { void GetBlock(uint32 x, uint32 y, uint32 width, const uint32 *pixels, Tile &t) {
for(uint32 j = 0; j < 4; j++) for(uint32 j = 0; j < 4; j++)
@ -146,11 +146,11 @@ namespace BC7C {
double mse = kModeFuncs[mode](t, out); double mse = kModeFuncs[mode](t, out);
PrintStat(log, ss.str().c_str(), mse); PrintStat(log, ss.str().c_str(), mse);
BitStreamReadOnly strm(reinterpret_cast<uint8 *>(out)); FasTC::BitStreamReadOnly strm(reinterpret_cast<uint8 *>(out));
while(!strm.ReadBit()); while(!strm.ReadBit());
const BC7CompressionMode::Attributes *attrs = const CompressionMode::Attributes *attrs =
BC7CompressionMode::GetAttributesForMode(mode); CompressionMode::GetAttributesForMode(mode);
const uint32 nSubsets = attrs->numSubsets; const uint32 nSubsets = attrs->numSubsets;
ss.str(""); ss.str("");

View file

@ -66,6 +66,7 @@ IF(NOT AVPCLLIB_ROOT STREQUAL "")
ENDIF() ENDIF()
ADD_SUBDIRECTORY(${AVPCLLIB_ROOT}/src ${CMAKE_CURRENT_BINARY_DIR}/bc7_export) ADD_SUBDIRECTORY(${AVPCLLIB_ROOT}/src ${CMAKE_CURRENT_BINARY_DIR}/bc7_export)
set(AVPCLLIB_INCLUDE_DIR ${AVPCLLIB_ROOT}/src ) set(AVPCLLIB_INCLUDE_DIR ${AVPCLLIB_ROOT}/src )
SET(FOUND_NVTT_BPTC_EXPORT TRUE)
ENDIF() ENDIF()
mark_as_advanced( FORCE AVPCLLIB_ROOT AVPCLLIB_INCLUDE_DIR ) mark_as_advanced( FORCE AVPCLLIB_ROOT AVPCLLIB_INCLUDE_DIR )