Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BC7_SRGB format support #287

Merged
merged 2 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,9 @@ DXGI_FORMAT CMP2DXGIFormat(CMP_FORMAT cmp_format) {
case CMP_FORMAT_BC7:
dxgi_format = DXGI_FORMAT_BC7_UNORM;
break;
case CMP_FORMAT_BC7_SRGB:
dxgi_format = DXGI_FORMAT_BC7_UNORM_SRGB;
break;
//uncompressed format
case CMP_FORMAT_ARGB_8888:
case CMP_FORMAT_RGBA_8888:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,9 @@ VkFormat MIP2VK_Format(MipSet* pMipsTexture) {
case CMP_FORMAT_BC7:
m_VKnum = VK_FORMAT_BC7_UNORM_BLOCK;
break;
case CMP_FORMAT_BC7_SRGB:
m_VKnum = VK_FORMAT_BC7_SRGB_BLOCK;
break;
case CMP_FORMAT_ETC_RGB:
case CMP_FORMAT_ETC2_RGB:
m_VKnum = VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK;
Expand Down
3 changes: 3 additions & 0 deletions applications/_plugins/cgpudecode/directx/gpu_directx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,9 @@ DXGI_FORMAT GPU_DirectX::CMP2DXGIFormat(CMP_FORMAT cmp_format)
case CMP_FORMAT_BC7:
dxgi_format = DXGI_FORMAT_BC7_UNORM;
break;
case CMP_FORMAT_BC7_SRGB:
dxgi_format = DXGI_FORMAT_BC7_UNORM_SRGB;
break;

// Unknown compression mapping to Direct X
#if (OPTION_BUILD_ASTC == 1)
Expand Down
3 changes: 3 additions & 0 deletions applications/_plugins/cgpudecode/opengl/gpu_opengl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ unsigned int GPU_OpenGL::MIP2OLG_Format(const CMP_Texture* pSourceTexture)
case CMP_FORMAT_BC7:
m_GLnum = GL_COMPRESSED_RGBA_BPTC_UNORM;
break;
case CMP_FORMAT_BC7_SRGB:
m_GLnum = GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM;
break;
case CMP_FORMAT_ETC_RGB:
case CMP_FORMAT_ETC2_RGB:
m_GLnum = GL_COMPRESSED_RGB8_ETC2;
Expand Down
3 changes: 3 additions & 0 deletions applications/_plugins/cgpudecode/vulkan/gpu_vulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,9 @@ VkFormat GPU_Vulkan::MIP2VK_Format(const CMP_Texture* pSourceTexture)
case CMP_FORMAT_BC7:
m_VKnum = VK_FORMAT_BC7_UNORM_BLOCK;
break;
case CMP_FORMAT_BC7_SRGB:
m_VKnum = VK_FORMAT_BC7_SRGB_BLOCK;
break;
case CMP_FORMAT_ETC_RGB:
case CMP_FORMAT_ETC2_RGB:
m_VKnum = VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK;
Expand Down
10 changes: 9 additions & 1 deletion applications/_plugins/cimage/dds/dds_dx10.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,17 @@ TC_PluginError LoadDDS_DX10(FILE* pFile, DDSD2* pDDSD, MipSet* pMipSet)

case DXGI_FORMAT_BC7_TYPELESS:
case DXGI_FORMAT_BC7_UNORM:
case DXGI_FORMAT_BC7_UNORM_SRGB:
pMipSet->m_compressed = true;
pMipSet->m_format = CMP_FORMAT_BC7;
err = LoadDDS_DX10_FourCC(pFile, pDDSD, pMipSet, CMP_FOURCC_DX10);
break;

case DXGI_FORMAT_BC7_UNORM_SRGB:
pMipSet->m_compressed = true;
pMipSet->m_format = CMP_FORMAT_BC7_SRGB;
err = LoadDDS_DX10_FourCC(pFile, pDDSD, pMipSet, CMP_FOURCC_DX10);
break;

// case DXGI_FORMAT_???:
// pMipSet->m_compressed = true;
// pMipSet->m_format = CMP_FORMAT_ASTC;
Expand Down Expand Up @@ -393,6 +398,8 @@ DXGI_FORMAT GetDXGIFormat(const MipSet* pMipSet)
return DXGI_FORMAT_BC5_UNORM;
case CMP_FORMAT_BC7:
return DXGI_FORMAT_BC7_UNORM;
case CMP_FORMAT_BC7_SRGB:
return DXGI_FORMAT_BC7_UNORM_SRGB;
// case CMP_FORMAT_ASTC: return DXGI_FORMAT_????; Not yet supported as of Jun 24 2015
}
}
Expand Down Expand Up @@ -476,6 +483,7 @@ TC_PluginError SaveDDS_DX10(FILE* pFile, const MipSet* pMipSet)
ddsd2.lPitch = ddsd2.dwWidth * 4;
break;
case CMP_FORMAT_BC7:
case CMP_FORMAT_BC7_SRGB:
default:
ddsd2.lPitch = ddsd2.dwWidth * 4;
break;
Expand Down
8 changes: 8 additions & 0 deletions applications/_plugins/cimage/ktx/ktx1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,10 @@ int Plugin_KTX::TC_PluginFileLoadTexture(const char* pszFilename, MipSet* pMipSe
pMipSet->m_format = CMP_FORMAT_BC7;
pMipSet->m_TextureDataType = TDT_ARGB;
break;
case RGB_BP_SRGB:
pMipSet->m_format = CMP_FORMAT_BC7_SRGB;
pMipSet->m_TextureDataType = TDT_ARGB;
break;
case RGB_BP_UNSIGNED_FLOAT:
pMipSet->m_format = CMP_FORMAT_BC6H;
pMipSet->m_TextureDataType = TDT_ARGB;
Expand Down Expand Up @@ -1101,6 +1105,7 @@ int Plugin_KTX::TC_PluginFileSaveTexture(const char* pszFilename, MipSet* pMipSe
case CMP_FORMAT_BC6H:
case CMP_FORMAT_BC6H_SF:
case CMP_FORMAT_BC7:
case CMP_FORMAT_BC7_SRGB:
case CMP_FORMAT_DXT1:
case CMP_FORMAT_DXT3:
case CMP_FORMAT_DXT5:
Expand Down Expand Up @@ -1251,6 +1256,9 @@ int Plugin_KTX::TC_PluginFileSaveTexture(const char* pszFilename, MipSet* pMipSe
case CMP_FORMAT_BC7:
textureinfo.glInternalFormat = RGB_BP_UNorm;
break;
case CMP_FORMAT_BC7_SRGB:
textureinfo.glInternalFormat = RGB_BP_SRGB;
break;
case CMP_FORMAT_ATI1N:
textureinfo.glInternalFormat = R_ATI1N_UNorm;
break;
Expand Down
1 change: 1 addition & 0 deletions applications/_plugins/cimage/ktx/ktx1.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ enum scanline_copy_method
#define RGB_BP_UNSIGNED_FLOAT 0x8E8F // GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB //bc6
#define RGB_BP_SIGNED_FLOAT 0x8E8E // GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB
#define RGB_BP_UNorm 0x8E8C // GL_COMPRESSED_RGBA_BPTC_UNORM_ARB //bc7
#define RGB_BP_SRGB 0x8E8D // GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB //bc7_srgb
#define COMPRESSED_RED_RGTC1 0x8DBB //bc4
#define COMPRESSED_RG_RGTC2 0x8DBD //bc5 ATI2_XY

Expand Down
7 changes: 7 additions & 0 deletions applications/_plugins/cimage/ktx2/ktx2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ int Plugin_KTX2::TC_PluginFileLoadTexture(const char* pszFilename, MipSet* pMipS
case VK_FORMAT_BC7_UNORM_BLOCK:
pMipSet->m_format = CMP_FORMAT_BC7;
break;
case VK_FORMAT_BC7_SRGB_BLOCK:
pMipSet->m_format = CMP_FORMAT_BC7_SRGB;
break;
case VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:
pMipSet->m_format = CMP_FORMAT_ETC2_RGB; // Skip ETC as ETC2 is backward comp
break;
Expand Down Expand Up @@ -849,6 +852,10 @@ int Plugin_KTX2::TC_PluginFileSaveTexture(const char* pszFilename, MipSet* pMipS
// RGB_BP_UNorm;
textureCreateInfo.vkFormat = VK_FORMAT_BC7_UNORM_BLOCK;
break;
case CMP_FORMAT_BC7_SRGB:
// RGB_BP_SRGB;
textureCreateInfo.vkFormat = VK_FORMAT_BC7_SRGB_BLOCK;
break;
//case CMP_FORMAT_ATI1N:
// // COMPRESSED_FORMAT_ATI1N_UNorm_TMP;
// textureCreateInfo.vkFormat = VK_FORMAT_BC4_UNORM_BLOCK;
Expand Down
1 change: 1 addition & 0 deletions applications/_plugins/cimage/ktx2/ktx2.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ extern void* make_Plugin_KTX2();
#define RGB_BP_UNSIGNED_FLOAT 0x8E8F // GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB //bc6
#define RGB_BP_SIGNED_FLOAT 0x8E8E // GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB
#define RGB_BP_UNorm 0x8E8C // GL_COMPRESSED_RGBA_BPTC_UNORM_ARB //bc7
#define RGB_BP_SRGB 0x8E8D // GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB //bc7_srgb
#define ATC_RGB_AMD 0x8C92
#define ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
#define ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
Expand Down
5 changes: 5 additions & 0 deletions applications/_plugins/cmp_gpu/directx/compute_directx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,7 @@ HRESULT CDirectX::GPU_Encode(ID3D11Buffer** ppDstTextureAsBufOut, int miplevel)
case DXGI_FORMAT_BC6H_UF16:
case DXGI_FORMAT_BC6H_SF16:
case DXGI_FORMAT_BC7_UNORM:
case DXGI_FORMAT_BC7_UNORM_SRGB:
default:
sbOutDesc.StructureByteStride = sizeof(OutCompressedStruct128Bits); // 16 Bytes
sbOutDesc.ByteWidth = NumOfBlocks * sizeof(OutCompressedStruct128Bits);
Expand Down Expand Up @@ -1650,6 +1651,10 @@ CMP_ERROR CDirectX::Compress(KernelOptions* KernelOptions, MipSet& srcTexture, M
m_fmtEncode = DXGI_FORMAT_BC6H_SF16;
m_activeEncoder = ACTIVE_ENCODER_BC6;
break;
case CMP_FORMAT_BC7_SRGB:
m_fmtEncode = DXGI_FORMAT_BC7_UNORM_SRGB;
m_activeEncoder = ACTIVE_ENCODER_BC7;
break;
default:
case CMP_FORMAT_BC7:
m_fmtEncode = DXGI_FORMAT_BC7_UNORM;
Expand Down
10 changes: 9 additions & 1 deletion applications/_plugins/common/atiformats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ CMP_FormatDesc g_FormatDesc[] = {
{CMP_FORMAT_BC6H, "BC6H"},
{CMP_FORMAT_BC6H_SF, "BC6H_SF"},
{CMP_FORMAT_BC7, "BC7"},
{CMP_FORMAT_BC7_SRGB, "BC7_SRGB"},

{CMP_FORMAT_DXT1, "DXT1"},
{CMP_FORMAT_DXT3, "DXT3"},
Expand Down Expand Up @@ -322,6 +323,9 @@ void CMP_API CMP_Format2FourCC(CMP_FORMAT format, MipSet* pMipSet)
case CMP_FORMAT_BC7:
pMipSet->m_dwFourCC = CMP_FOURCC_DX10;
break;
case CMP_FORMAT_BC7_SRGB:
pMipSet->m_dwFourCC = CMP_FOURCC_DX10;
break;
#if (OPTION_BUILD_ASTC == 1)
case CMP_FORMAT_ASTC:
pMipSet->m_dwFourCC = CMP_FOURCC_DX10;
Expand Down Expand Up @@ -468,6 +472,7 @@ CMP_BOOL CMP_API CMP_IsCompressedFormat(CMP_FORMAT format)
case CMP_FORMAT_BC6H:
case CMP_FORMAT_BC6H_SF:
case CMP_FORMAT_BC7:
case CMP_FORMAT_BC7_SRGB:
case CMP_FORMAT_DXT1:
case CMP_FORMAT_DXT3:
case CMP_FORMAT_DXT5:
Expand Down Expand Up @@ -605,6 +610,7 @@ CMP_BOOL CMP_API CMP_IsValidFormat(CMP_FORMAT InFormat)
case CMP_FORMAT_BC6H:
case CMP_FORMAT_BC6H_SF:
case CMP_FORMAT_BC7:
case CMP_FORMAT_BC7_SRGB:
case CMP_FORMAT_ATI1N:
case CMP_FORMAT_ATI2N:
case CMP_FORMAT_ATI2N_XY:
Expand Down Expand Up @@ -793,6 +799,8 @@ static CMP_FORMAT GetFormat(CMP_DWORD dwFourCC)
return CMP_FORMAT_BC6H;
case CMP_FOURCC_BC7:
return CMP_FORMAT_BC7;
case CMP_FOURCC_BC7_SRGB:
return CMP_FORMAT_BC7_SRGB;
#if (OPTION_BUILD_ASTC == 1)
case CMP_FOURCC_ASTC:
return CMP_FORMAT_ASTC;
Expand Down Expand Up @@ -877,4 +885,4 @@ CMP_FORMAT GetFormat(MipSet* pMipSet)
default:
return CMP_FORMAT_Unknown;
}
}
}
8 changes: 5 additions & 3 deletions applications/_plugins/common/cmdline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ static inline bool IsFileModel(const std::string& sourceFile)
static inline bool IsFormatBCN(CMP_FORMAT format)
{
return format == CMP_FORMAT_BC1 || format == CMP_FORMAT_BC2 || format == CMP_FORMAT_BC3 || format == CMP_FORMAT_BC4 || format == CMP_FORMAT_BC4_S ||
format == CMP_FORMAT_BC5 || format == CMP_FORMAT_BC5_S || format == CMP_FORMAT_BC6H || format == CMP_FORMAT_BC6H_SF || format == CMP_FORMAT_BC7;
format == CMP_FORMAT_BC5 || format == CMP_FORMAT_BC5_S || format == CMP_FORMAT_BC6H || format == CMP_FORMAT_BC6H_SF || format == CMP_FORMAT_BC7 ||
format == CMP_FORMAT_BC7_SRGB;
}

static inline bool IsProcessingBRLG(const CCmdLineParamaters& params)
Expand Down Expand Up @@ -2057,6 +2058,7 @@ bool SVMInitCodec(KernelOptions* options)
case CMP_FORMAT_BC1:
case CMP_FORMAT_DXT1:
case CMP_FORMAT_BC7:
case CMP_FORMAT_BC7_SRGB:
#if (OPTION_BUILD_ASTC == 1)
case CMP_FORMAT_ASTC:
#endif
Expand Down Expand Up @@ -3278,7 +3280,7 @@ int ProcessCMDLine(CMP_Feedback_Proc pFeedbackProc, MipSet* p_userMipSetIn)
if (destFormat == CMP_FORMAT_BC1 || destFormat == CMP_FORMAT_BC4 || destFormat == CMP_FORMAT_BC4_S)
bytesPerBlock = 8;
else if (destFormat == CMP_FORMAT_BC2 || destFormat == CMP_FORMAT_BC3 || destFormat == CMP_FORMAT_BC5 || destFormat == CMP_FORMAT_BC5_S ||
destFormat == CMP_FORMAT_BC6H || destFormat == CMP_FORMAT_BC6H_SF || destFormat == CMP_FORMAT_BC7)
destFormat == CMP_FORMAT_BC6H || destFormat == CMP_FORMAT_BC6H_SF || destFormat == CMP_FORMAT_BC7 || destFormat == CMP_FORMAT_BC7_SRGB)
bytesPerBlock = 16;

CMP_DWORD remainingSize = destMipSet.dwDataSize;
Expand Down Expand Up @@ -3529,7 +3531,7 @@ int ProcessCMDLine(CMP_Feedback_Proc pFeedbackProc, MipSet* p_userMipSetIn)
if ((g_CmdPrams.CompressOptions.fquality > 0.00f) && (g_CmdPrams.CompressOptions.fquality < 0.01f))
{
// set default max quality for fast processing codecs
if ((destFormat != CMP_FORMAT_BC7) && (destFormat != CMP_FORMAT_BC6H) && (destFormat != CMP_FORMAT_BC6H_SF))
if ((destFormat != CMP_FORMAT_BC7_SRGB) && (destFormat != CMP_FORMAT_BC7) && (destFormat != CMP_FORMAT_BC6H) && (destFormat != CMP_FORMAT_BC6H_SF))
{
g_CmdPrams.CompressOptions.fquality = 1.0f;
}
Expand Down
5 changes: 4 additions & 1 deletion applications/_plugins/common/codec_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ CodecType GetCodecType(CMP_FORMAT format)
return CT_BC6H_SF;
case CMP_FORMAT_BC7:
return CT_BC7;
case CMP_FORMAT_BC7_SRGB:
return CT_BC7_SRGB;
#if (OPTION_BUILD_ASTC == 1)
case CMP_FORMAT_ASTC:
return CT_ASTC;
Expand Down Expand Up @@ -239,6 +241,7 @@ CMP_DWORD CalcBufferSize(CodecType nCodecType, CMP_DWORD dwWidth, CMP_DWORD dwHe

// Block size is 4x4 and 128 bits per block
case CT_BC7:
case CT_BC7_SRGB:
dwWidth = ((dwWidth + 3) / 4) * 4;
dwHeight = ((dwHeight + 3) / 4) * 4;
buffsize = dwWidth * dwHeight;
Expand Down Expand Up @@ -296,4 +299,4 @@ CMP_DWORD CalcBufferSize(CodecType nCodecType, CMP_DWORD dwWidth, CMP_DWORD dwHe
}

return buffsize;
}
}
3 changes: 2 additions & 1 deletion applications/_plugins/common/codec_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ typedef enum _CodecType
CT_BC6H,
CT_BC6H_SF,
CT_BC7,
CT_BC7_SRGB,
#if (OPTION_BUILD_ASTC == 1)
CT_ASTC,
#endif
Expand All @@ -85,4 +86,4 @@ typedef enum _CODECError
CodecType GetCodecType(CMP_FORMAT format);
CMP_DWORD CalcBufferSize(CodecType nCodecType, CMP_DWORD dwWidth, CMP_DWORD dwHeight, CMP_BYTE nBlockWidth, CMP_BYTE nBlockHeight);

#endif
#endif
2 changes: 2 additions & 0 deletions applications/_plugins/common/texture.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ extern "C" {

#define CMP_FOURCC_BC6H CMP_MAKEFOURCC('B', 'C', '6', 'H')
#define CMP_FOURCC_BC7 CMP_MAKEFOURCC('B', 'C', '7', 'x')
#define CMP_FOURCC_BC7_SRGB CMP_MAKEFOURCC('B', 'C', '7', 's')

#if (OPTION_BUILD_ASTC == 1)
#define CMP_FOURCC_ASTC CMP_MAKEFOURCC('A', 'S', 'T', 'C')
#endif
Expand Down
1 change: 1 addition & 0 deletions applications/_plugins/common/textureio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,7 @@ int AMDSaveMIPSTextureImage(const char* DestFile, MipSet* MipSetIn, bool use_OCV
case CMP_FORMAT_ASTC:
#endif
case CMP_FORMAT_BC7:
case CMP_FORMAT_BC7_SRGB:
case CMP_FORMAT_BC6H:
case CMP_FORMAT_BC6H_SF:
case CMP_FORMAT_ETC_RGB:
Expand Down
4 changes: 2 additions & 2 deletions cmp_compressonatorlib/bc7/codec_bc7.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ unsigned int BC7ThreadProcEncode(void* param)
// Construction/Destruction
//////////////////////////////////////////////////////////////////////////////

CCodec_BC7::CCodec_BC7()
: CCodec_DXTC(CT_BC7)
CCodec_BC7::CCodec_BC7(CodecType codecType)
: CCodec_DXTC(codecType) {
{
m_LibraryInitialized = false;

Expand Down
2 changes: 1 addition & 1 deletion cmp_compressonatorlib/bc7/codec_bc7.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct BC7EncodeThreadParam
class CCodec_BC7 : public CCodec_DXTC
{
public:
CCodec_BC7();
CCodec_BC7(CodecType codecType);
~CCodec_BC7();

virtual bool SetParameter(const CMP_CHAR* pszParamName, CMP_CHAR* sValue);
Expand Down
3 changes: 2 additions & 1 deletion cmp_compressonatorlib/common/codec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ CCodec* CreateCodec(CodecType nCodecType)
case CT_BC6H_SF:
return new CCodec_BC6H(nCodecType);
case CT_BC7:
return new CCodec_BC7;
case CT_BC7_SRGB:
return new CCodec_BC7(nCodecType);
#if (OPTION_BUILD_ASTC == 1)
case CT_ASTC:
return new CCodec_ASTC;
Expand Down
4 changes: 4 additions & 0 deletions cmp_compressonatorlib/compress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ static void CMP_PrepareCMPSourceForIMG_Destination(CMP_Texture* destTexture, CMP
#endif
case CMP_FORMAT_BC6H:
case CMP_FORMAT_BC7:
case CMP_FORMAT_BC7_SRGB:
case CMP_FORMAT_GT:
case CMP_FORMAT_ETC_RGB:
case CMP_FORMAT_ETC2_RGB:
Expand Down Expand Up @@ -236,6 +237,7 @@ CMP_ERROR CodecCompressTexture(const CMP_Texture* srcTexture, CMP_Texture* destT
switch (destType)
{
case CT_BC7:
case CT_BC7_SRGB:
codec->SetParameter("MultiThreading", (CMP_DWORD)!options->bDisableMultiThreading);

if (!options->bDisableMultiThreading)
Expand Down Expand Up @@ -517,6 +519,8 @@ CMP_ERROR CodecCompressTextureThreaded(const CMP_Texture* srcTexture,
// Note function should not be called for the following Codecs....
if (destType == CT_BC7)
return CMP_ABORTED;
if (destType == CT_BC7_SRGB)
return CMP_ABORTED;
#ifdef USE_APC
if (destType == CT_APC)
return CMP_ABORTED;
Expand Down