GPUOpen-Tools / compressonator

Tool suite for Texture and 3D Model Compression, Optimization and Analysis using CPUs, GPUs and APUs
1.3k stars 196 forks source link

CMP_InitFramework, CMP_InitHostPlugins don't add ASTC, KTX IMAGE plugins #175

Open ShukantPal opened 3 years ago

ShukantPal commented 3 years ago

After fixing #174 in my application code, I saw that Compressonator was failing on error code 28 CMP_ERR_GENERIC on saving the destination texture. I looked into the code and SaveTexture returns this error code when the IMAGE plugin responsible for saving the particular image format is not available.

It turns out that CMP_InitFramework adds a IMAGE plugin for DDS files; Compressonator application code adds plugins manually for ASTC, EXR, KTX, KTX2, and more formats. To register these plugins myself, I have to include internal header files (application/_plugins/common/pluginmanager.h) which is not good.

I think there are two solutions:

  1. Document that you have to register these plugins manually and add them to compressonator.h so developers don't have to access internal header files.
  2. Register these plugins automatically in CMP_InitFramework. I think this one is better.
NPCompress commented 3 years ago

@ShukantPal Will look into adding registering plugin options in CMP_InitFramework.