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_MSVC_ATOMICS
#cmakedefine FOUND_NVTT_BC7_EXPORT
#cmakedefine FOUND_NVTT_BPTC_EXPORT

View file

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

View file

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