GPUOpen-Tools / compressonator

Tool suite for Texture and 3D Model Compression, Optimization and Analysis using CPUs, GPUs and APUs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some declarations in compressonator.h are not defined in Compressonator_xx.lib

bekorn opened this issue · comments

commented

Hello,

I downloaded CompressonatorSDK_x64_4.3.206.exe and setup a project with include/compressonator.h and lib/VS2019/x64/Compressonator_MD.lib to run the examples/sdk_example1/SDK_example.cpp. Everything worked and I compressed ruby.dds into ruby.dds but BC7 👌.

I tried to follow the comment in the example

// A newer DDS loader utility is provided in V3.2 SDK : CMP_LoadTexture and CMP_SaveTexture, These use the MipMap structure
// to hold the image buffers used for processing.

Added this line to test if it will build auto * func_ptr = CMP_LoadTexture

It failed with the error main.cpp.obj : error LNK2019: unresolved external symbol CMP_LoadTexture referenced in function main

Did a quick test and only the functions CMP_Format2FourCC, CMP_IsCompressedFormat, CMP_IsFloatFormat are defined in this block of declerations

//--------------------------------------------
// CMP_Compute Lib: Texture Encoder Interfaces
//--------------------------------------------
CMP_ERROR CMP_API CMP_LoadTexture(const char *sourceFile, CMP_MipSet *pMipSet);
CMP_ERROR CMP_API CMP_SaveTexture(const char *destFile, CMP_MipSet *pMipSet);
CMP_ERROR CMP_API CMP_ProcessTexture(CMP_MipSet* srcMipSet, CMP_MipSet* dstMipSet, KernelOptions kernelOptions, CMP_Feedback_Proc pFeedbackProc);
CMP_ERROR CMP_API CMP_CompressTexture(KernelOptions *options,CMP_MipSet srcMipSet,CMP_MipSet dstMipSet,CMP_Feedback_Proc pFeedback);
CMP_VOID CMP_API CMP_Format2FourCC(CMP_FORMAT format, CMP_MipSet *pMipSet);
CMP_FORMAT CMP_API CMP_ParseFormat(char* pFormat);
CMP_INT CMP_API CMP_NumberOfProcessors();
CMP_VOID CMP_API CMP_FreeMipSet(CMP_MipSet *MipSetIn);
CMP_VOID CMP_API CMP_GetMipLevel(CMP_MipLevel **data, const CMP_MipSet* pMipSet, CMP_INT nMipLevel, CMP_INT nFaceOrSlice);
CMP_ERROR CMP_API CMP_GetPerformanceStats(KernelPerformanceStats* pPerfStats);
CMP_ERROR CMP_API CMP_GetDeviceInfo(KernelDeviceInfo* pDeviceInfo);
CMP_BOOL CMP_API CMP_IsCompressedFormat(CMP_FORMAT format);
CMP_BOOL CMP_API CMP_IsFloatFormat(CMP_FORMAT InFormat);

This seemed like an issue on your side, hence this report.


Additionally:

  • Is there a utility in the SDK that can load various image formats besides dds (especially png/jpg/hdr)?
  • How can I run CMP_ConvertTexture & CMP_ConvertMipTexture on the GPU? The SDK section of the documentation does not mention this.

Same issue with the missing symbols in the .lib.

@bekorn Issue addressed in v4.5 release