Skip to content

Commit acaa6b2

Browse files
authored
Merge pull request #309 from GPUOpen-Tools/revert-287-bc7-srgb
Revert "Add BC7_SRGB format support"
2 parents 4478a3d + 3a39eb9 commit acaa6b2

File tree

24 files changed

+16
-90
lines changed

24 files changed

+16
-90
lines changed

applications/_plugins/c3dmodel_viewers/gltf_dx12_ex/dx12util/cmp_texturedx12.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -524,9 +524,6 @@ DXGI_FORMAT CMP2DXGIFormat(CMP_FORMAT cmp_format) {
524524
case CMP_FORMAT_BC7:
525525
dxgi_format = DXGI_FORMAT_BC7_UNORM;
526526
break;
527-
case CMP_FORMAT_BC7_SRGB:
528-
dxgi_format = DXGI_FORMAT_BC7_UNORM_SRGB;
529-
break;
530527
//uncompressed format
531528
case CMP_FORMAT_ARGB_8888:
532529
case CMP_FORMAT_RGBA_8888:

applications/_plugins/c3dmodel_viewers/vulkan/util/cmp_texturevk.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -355,9 +355,6 @@ VkFormat MIP2VK_Format(MipSet* pMipsTexture) {
355355
case CMP_FORMAT_BC7:
356356
m_VKnum = VK_FORMAT_BC7_UNORM_BLOCK;
357357
break;
358-
case CMP_FORMAT_BC7_SRGB:
359-
m_VKnum = VK_FORMAT_BC7_SRGB_BLOCK;
360-
break;
361358
case CMP_FORMAT_ETC_RGB:
362359
case CMP_FORMAT_ETC2_RGB:
363360
m_VKnum = VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK;

applications/_plugins/cgpudecode/directx/gpu_directx.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -614,9 +614,6 @@ DXGI_FORMAT GPU_DirectX::CMP2DXGIFormat(CMP_FORMAT cmp_format)
614614
case CMP_FORMAT_BC7:
615615
dxgi_format = DXGI_FORMAT_BC7_UNORM;
616616
break;
617-
case CMP_FORMAT_BC7_SRGB:
618-
dxgi_format = DXGI_FORMAT_BC7_UNORM_SRGB;
619-
break;
620617

621618
// Unknown compression mapping to Direct X
622619
#if (OPTION_BUILD_ASTC == 1)

applications/_plugins/cgpudecode/opengl/gpu_opengl.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,6 @@ unsigned int GPU_OpenGL::MIP2OLG_Format(const CMP_Texture* pSourceTexture)
171171
case CMP_FORMAT_BC7:
172172
m_GLnum = GL_COMPRESSED_RGBA_BPTC_UNORM;
173173
break;
174-
case CMP_FORMAT_BC7_SRGB:
175-
m_GLnum = GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM;
176-
break;
177174
case CMP_FORMAT_ETC_RGB:
178175
case CMP_FORMAT_ETC2_RGB:
179176
m_GLnum = GL_COMPRESSED_RGB8_ETC2;

applications/_plugins/cgpudecode/vulkan/gpu_vulkan.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -956,9 +956,6 @@ VkFormat GPU_Vulkan::MIP2VK_Format(const CMP_Texture* pSourceTexture)
956956
case CMP_FORMAT_BC7:
957957
m_VKnum = VK_FORMAT_BC7_UNORM_BLOCK;
958958
break;
959-
case CMP_FORMAT_BC7_SRGB:
960-
m_VKnum = VK_FORMAT_BC7_SRGB_BLOCK;
961-
break;
962959
case CMP_FORMAT_ETC_RGB:
963960
case CMP_FORMAT_ETC2_RGB:
964961
m_VKnum = VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK;

applications/_plugins/cimage/dds/dds_dx10.cpp

+1-9
Original file line numberDiff line numberDiff line change
@@ -238,14 +238,9 @@ TC_PluginError LoadDDS_DX10(FILE* pFile, DDSD2* pDDSD, MipSet* pMipSet)
238238

239239
case DXGI_FORMAT_BC7_TYPELESS:
240240
case DXGI_FORMAT_BC7_UNORM:
241-
pMipSet->m_compressed = true;
242-
pMipSet->m_format = CMP_FORMAT_BC7;
243-
err = LoadDDS_DX10_FourCC(pFile, pDDSD, pMipSet, CMP_FOURCC_DX10);
244-
break;
245-
246241
case DXGI_FORMAT_BC7_UNORM_SRGB:
247242
pMipSet->m_compressed = true;
248-
pMipSet->m_format = CMP_FORMAT_BC7_SRGB;
243+
pMipSet->m_format = CMP_FORMAT_BC7;
249244
err = LoadDDS_DX10_FourCC(pFile, pDDSD, pMipSet, CMP_FOURCC_DX10);
250245
break;
251246

@@ -398,8 +393,6 @@ DXGI_FORMAT GetDXGIFormat(const MipSet* pMipSet)
398393
return DXGI_FORMAT_BC5_UNORM;
399394
case CMP_FORMAT_BC7:
400395
return DXGI_FORMAT_BC7_UNORM;
401-
case CMP_FORMAT_BC7_SRGB:
402-
return DXGI_FORMAT_BC7_UNORM_SRGB;
403396
// case CMP_FORMAT_ASTC: return DXGI_FORMAT_????; Not yet supported as of Jun 24 2015
404397
}
405398
}
@@ -483,7 +476,6 @@ TC_PluginError SaveDDS_DX10(FILE* pFile, const MipSet* pMipSet)
483476
ddsd2.lPitch = ddsd2.dwWidth * 4;
484477
break;
485478
case CMP_FORMAT_BC7:
486-
case CMP_FORMAT_BC7_SRGB:
487479
default:
488480
ddsd2.lPitch = ddsd2.dwWidth * 4;
489481
break;

applications/_plugins/cimage/ktx/ktx1.cpp

-8
Original file line numberDiff line numberDiff line change
@@ -465,10 +465,6 @@ int Plugin_KTX::TC_PluginFileLoadTexture(const char* pszFilename, MipSet* pMipSe
465465
pMipSet->m_format = CMP_FORMAT_BC7;
466466
pMipSet->m_TextureDataType = TDT_ARGB;
467467
break;
468-
case RGB_BP_SRGB:
469-
pMipSet->m_format = CMP_FORMAT_BC7_SRGB;
470-
pMipSet->m_TextureDataType = TDT_ARGB;
471-
break;
472468
case RGB_BP_UNSIGNED_FLOAT:
473469
pMipSet->m_format = CMP_FORMAT_BC6H;
474470
pMipSet->m_TextureDataType = TDT_ARGB;
@@ -1105,7 +1101,6 @@ int Plugin_KTX::TC_PluginFileSaveTexture(const char* pszFilename, MipSet* pMipSe
11051101
case CMP_FORMAT_BC6H:
11061102
case CMP_FORMAT_BC6H_SF:
11071103
case CMP_FORMAT_BC7:
1108-
case CMP_FORMAT_BC7_SRGB:
11091104
case CMP_FORMAT_DXT1:
11101105
case CMP_FORMAT_DXT3:
11111106
case CMP_FORMAT_DXT5:
@@ -1256,9 +1251,6 @@ int Plugin_KTX::TC_PluginFileSaveTexture(const char* pszFilename, MipSet* pMipSe
12561251
case CMP_FORMAT_BC7:
12571252
textureinfo.glInternalFormat = RGB_BP_UNorm;
12581253
break;
1259-
case CMP_FORMAT_BC7_SRGB:
1260-
textureinfo.glInternalFormat = RGB_BP_SRGB;
1261-
break;
12621254
case CMP_FORMAT_ATI1N:
12631255
textureinfo.glInternalFormat = R_ATI1N_UNorm;
12641256
break;

applications/_plugins/cimage/ktx/ktx1.h

-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ enum scanline_copy_method
164164
#define RGB_BP_UNSIGNED_FLOAT 0x8E8F // GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB //bc6
165165
#define RGB_BP_SIGNED_FLOAT 0x8E8E // GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB
166166
#define RGB_BP_UNorm 0x8E8C // GL_COMPRESSED_RGBA_BPTC_UNORM_ARB //bc7
167-
#define RGB_BP_SRGB 0x8E8D // GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB //bc7_srgb
168167
#define COMPRESSED_RED_RGTC1 0x8DBB //bc4
169168
#define COMPRESSED_RG_RGTC2 0x8DBD //bc5 ATI2_XY
170169

applications/_plugins/cimage/ktx2/ktx2.cpp

-7
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,6 @@ int Plugin_KTX2::TC_PluginFileLoadTexture(const char* pszFilename, MipSet* pMipS
217217
case VK_FORMAT_BC7_UNORM_BLOCK:
218218
pMipSet->m_format = CMP_FORMAT_BC7;
219219
break;
220-
case VK_FORMAT_BC7_SRGB_BLOCK:
221-
pMipSet->m_format = CMP_FORMAT_BC7_SRGB;
222-
break;
223220
case VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:
224221
pMipSet->m_format = CMP_FORMAT_ETC2_RGB; // Skip ETC as ETC2 is backward comp
225222
break;
@@ -852,10 +849,6 @@ int Plugin_KTX2::TC_PluginFileSaveTexture(const char* pszFilename, MipSet* pMipS
852849
// RGB_BP_UNorm;
853850
textureCreateInfo.vkFormat = VK_FORMAT_BC7_UNORM_BLOCK;
854851
break;
855-
case CMP_FORMAT_BC7_SRGB:
856-
// RGB_BP_SRGB;
857-
textureCreateInfo.vkFormat = VK_FORMAT_BC7_SRGB_BLOCK;
858-
break;
859852
//case CMP_FORMAT_ATI1N:
860853
// // COMPRESSED_FORMAT_ATI1N_UNorm_TMP;
861854
// textureCreateInfo.vkFormat = VK_FORMAT_BC4_UNORM_BLOCK;

applications/_plugins/cimage/ktx2/ktx2.h

-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ extern void* make_Plugin_KTX2();
9191
#define RGB_BP_UNSIGNED_FLOAT 0x8E8F // GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB //bc6
9292
#define RGB_BP_SIGNED_FLOAT 0x8E8E // GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB
9393
#define RGB_BP_UNorm 0x8E8C // GL_COMPRESSED_RGBA_BPTC_UNORM_ARB //bc7
94-
#define RGB_BP_SRGB 0x8E8D // GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB //bc7_srgb
9594
#define ATC_RGB_AMD 0x8C92
9695
#define ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
9796
#define ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE

applications/_plugins/cmp_gpu/directx/compute_directx.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -1022,7 +1022,6 @@ HRESULT CDirectX::GPU_Encode(ID3D11Buffer** ppDstTextureAsBufOut, int miplevel)
10221022
case DXGI_FORMAT_BC6H_UF16:
10231023
case DXGI_FORMAT_BC6H_SF16:
10241024
case DXGI_FORMAT_BC7_UNORM:
1025-
case DXGI_FORMAT_BC7_UNORM_SRGB:
10261025
default:
10271026
sbOutDesc.StructureByteStride = sizeof(OutCompressedStruct128Bits); // 16 Bytes
10281027
sbOutDesc.ByteWidth = NumOfBlocks * sizeof(OutCompressedStruct128Bits);
@@ -1651,10 +1650,6 @@ CMP_ERROR CDirectX::Compress(KernelOptions* KernelOptions, MipSet& srcTexture, M
16511650
m_fmtEncode = DXGI_FORMAT_BC6H_SF16;
16521651
m_activeEncoder = ACTIVE_ENCODER_BC6;
16531652
break;
1654-
case CMP_FORMAT_BC7_SRGB:
1655-
m_fmtEncode = DXGI_FORMAT_BC7_UNORM_SRGB;
1656-
m_activeEncoder = ACTIVE_ENCODER_BC7;
1657-
break;
16581653
default:
16591654
case CMP_FORMAT_BC7:
16601655
m_fmtEncode = DXGI_FORMAT_BC7_UNORM;

applications/_plugins/common/atiformats.cpp

+1-9
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ CMP_FormatDesc g_FormatDesc[] = {
9797
{CMP_FORMAT_BC6H, "BC6H"},
9898
{CMP_FORMAT_BC6H_SF, "BC6H_SF"},
9999
{CMP_FORMAT_BC7, "BC7"},
100-
{CMP_FORMAT_BC7_SRGB, "BC7_SRGB"},
101100

102101
{CMP_FORMAT_DXT1, "DXT1"},
103102
{CMP_FORMAT_DXT3, "DXT3"},
@@ -323,9 +322,6 @@ void CMP_API CMP_Format2FourCC(CMP_FORMAT format, MipSet* pMipSet)
323322
case CMP_FORMAT_BC7:
324323
pMipSet->m_dwFourCC = CMP_FOURCC_DX10;
325324
break;
326-
case CMP_FORMAT_BC7_SRGB:
327-
pMipSet->m_dwFourCC = CMP_FOURCC_DX10;
328-
break;
329325
#if (OPTION_BUILD_ASTC == 1)
330326
case CMP_FORMAT_ASTC:
331327
pMipSet->m_dwFourCC = CMP_FOURCC_DX10;
@@ -472,7 +468,6 @@ CMP_BOOL CMP_API CMP_IsCompressedFormat(CMP_FORMAT format)
472468
case CMP_FORMAT_BC6H:
473469
case CMP_FORMAT_BC6H_SF:
474470
case CMP_FORMAT_BC7:
475-
case CMP_FORMAT_BC7_SRGB:
476471
case CMP_FORMAT_DXT1:
477472
case CMP_FORMAT_DXT3:
478473
case CMP_FORMAT_DXT5:
@@ -610,7 +605,6 @@ CMP_BOOL CMP_API CMP_IsValidFormat(CMP_FORMAT InFormat)
610605
case CMP_FORMAT_BC6H:
611606
case CMP_FORMAT_BC6H_SF:
612607
case CMP_FORMAT_BC7:
613-
case CMP_FORMAT_BC7_SRGB:
614608
case CMP_FORMAT_ATI1N:
615609
case CMP_FORMAT_ATI2N:
616610
case CMP_FORMAT_ATI2N_XY:
@@ -799,8 +793,6 @@ static CMP_FORMAT GetFormat(CMP_DWORD dwFourCC)
799793
return CMP_FORMAT_BC6H;
800794
case CMP_FOURCC_BC7:
801795
return CMP_FORMAT_BC7;
802-
case CMP_FOURCC_BC7_SRGB:
803-
return CMP_FORMAT_BC7_SRGB;
804796
#if (OPTION_BUILD_ASTC == 1)
805797
case CMP_FOURCC_ASTC:
806798
return CMP_FORMAT_ASTC;
@@ -885,4 +877,4 @@ CMP_FORMAT GetFormat(MipSet* pMipSet)
885877
default:
886878
return CMP_FORMAT_Unknown;
887879
}
888-
}
880+
}

applications/_plugins/common/cmdline.cpp

+3-5
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,7 @@ static inline bool IsFileModel(const std::string& sourceFile)
183183
static inline bool IsFormatBCN(CMP_FORMAT format)
184184
{
185185
return format == CMP_FORMAT_BC1 || format == CMP_FORMAT_BC2 || format == CMP_FORMAT_BC3 || format == CMP_FORMAT_BC4 || format == CMP_FORMAT_BC4_S ||
186-
format == CMP_FORMAT_BC5 || format == CMP_FORMAT_BC5_S || format == CMP_FORMAT_BC6H || format == CMP_FORMAT_BC6H_SF || format == CMP_FORMAT_BC7 ||
187-
format == CMP_FORMAT_BC7_SRGB;
186+
format == CMP_FORMAT_BC5 || format == CMP_FORMAT_BC5_S || format == CMP_FORMAT_BC6H || format == CMP_FORMAT_BC6H_SF || format == CMP_FORMAT_BC7;
188187
}
189188

190189
static inline bool IsProcessingBRLG(const CCmdLineParamaters& params)
@@ -2058,7 +2057,6 @@ bool SVMInitCodec(KernelOptions* options)
20582057
case CMP_FORMAT_BC1:
20592058
case CMP_FORMAT_DXT1:
20602059
case CMP_FORMAT_BC7:
2061-
case CMP_FORMAT_BC7_SRGB:
20622060
#if (OPTION_BUILD_ASTC == 1)
20632061
case CMP_FORMAT_ASTC:
20642062
#endif
@@ -3280,7 +3278,7 @@ int ProcessCMDLine(CMP_Feedback_Proc pFeedbackProc, MipSet* p_userMipSetIn)
32803278
if (destFormat == CMP_FORMAT_BC1 || destFormat == CMP_FORMAT_BC4 || destFormat == CMP_FORMAT_BC4_S)
32813279
bytesPerBlock = 8;
32823280
else if (destFormat == CMP_FORMAT_BC2 || destFormat == CMP_FORMAT_BC3 || destFormat == CMP_FORMAT_BC5 || destFormat == CMP_FORMAT_BC5_S ||
3283-
destFormat == CMP_FORMAT_BC6H || destFormat == CMP_FORMAT_BC6H_SF || destFormat == CMP_FORMAT_BC7 || destFormat == CMP_FORMAT_BC7_SRGB)
3281+
destFormat == CMP_FORMAT_BC6H || destFormat == CMP_FORMAT_BC6H_SF || destFormat == CMP_FORMAT_BC7)
32843282
bytesPerBlock = 16;
32853283

32863284
CMP_DWORD remainingSize = destMipSet.dwDataSize;
@@ -3531,7 +3529,7 @@ int ProcessCMDLine(CMP_Feedback_Proc pFeedbackProc, MipSet* p_userMipSetIn)
35313529
if ((g_CmdPrams.CompressOptions.fquality > 0.00f) && (g_CmdPrams.CompressOptions.fquality < 0.01f))
35323530
{
35333531
// set default max quality for fast processing codecs
3534-
if ((destFormat != CMP_FORMAT_BC7_SRGB) && (destFormat != CMP_FORMAT_BC7) && (destFormat != CMP_FORMAT_BC6H) && (destFormat != CMP_FORMAT_BC6H_SF))
3532+
if ((destFormat != CMP_FORMAT_BC7) && (destFormat != CMP_FORMAT_BC6H) && (destFormat != CMP_FORMAT_BC6H_SF))
35353533
{
35363534
g_CmdPrams.CompressOptions.fquality = 1.0f;
35373535
}

applications/_plugins/common/codec_common.cpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@ CodecType GetCodecType(CMP_FORMAT format)
116116
return CT_BC6H_SF;
117117
case CMP_FORMAT_BC7:
118118
return CT_BC7;
119-
case CMP_FORMAT_BC7_SRGB:
120-
return CT_BC7_SRGB;
121119
#if (OPTION_BUILD_ASTC == 1)
122120
case CMP_FORMAT_ASTC:
123121
return CT_ASTC;
@@ -241,7 +239,6 @@ CMP_DWORD CalcBufferSize(CodecType nCodecType, CMP_DWORD dwWidth, CMP_DWORD dwHe
241239

242240
// Block size is 4x4 and 128 bits per block
243241
case CT_BC7:
244-
case CT_BC7_SRGB:
245242
dwWidth = ((dwWidth + 3) / 4) * 4;
246243
dwHeight = ((dwHeight + 3) / 4) * 4;
247244
buffsize = dwWidth * dwHeight;
@@ -299,4 +296,4 @@ CMP_DWORD CalcBufferSize(CodecType nCodecType, CMP_DWORD dwWidth, CMP_DWORD dwHe
299296
}
300297

301298
return buffsize;
302-
}
299+
}

applications/_plugins/common/codec_common.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ typedef enum _CodecType
6363
CT_BC6H,
6464
CT_BC6H_SF,
6565
CT_BC7,
66-
CT_BC7_SRGB,
6766
#if (OPTION_BUILD_ASTC == 1)
6867
CT_ASTC,
6968
#endif
@@ -86,4 +85,4 @@ typedef enum _CODECError
8685
CodecType GetCodecType(CMP_FORMAT format);
8786
CMP_DWORD CalcBufferSize(CodecType nCodecType, CMP_DWORD dwWidth, CMP_DWORD dwHeight, CMP_BYTE nBlockWidth, CMP_BYTE nBlockHeight);
8887

89-
#endif
88+
#endif

applications/_plugins/common/texture.h

-2
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,6 @@ extern "C" {
118118

119119
#define CMP_FOURCC_BC6H CMP_MAKEFOURCC('B', 'C', '6', 'H')
120120
#define CMP_FOURCC_BC7 CMP_MAKEFOURCC('B', 'C', '7', 'x')
121-
#define CMP_FOURCC_BC7_SRGB CMP_MAKEFOURCC('B', 'C', '7', 's')
122-
123121
#if (OPTION_BUILD_ASTC == 1)
124122
#define CMP_FOURCC_ASTC CMP_MAKEFOURCC('A', 'S', 'T', 'C')
125123
#endif

applications/_plugins/common/textureio.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,6 @@ int AMDSaveMIPSTextureImage(const char* DestFile, MipSet* MipSetIn, bool use_OCV
768768
case CMP_FORMAT_ASTC:
769769
#endif
770770
case CMP_FORMAT_BC7:
771-
case CMP_FORMAT_BC7_SRGB:
772771
case CMP_FORMAT_BC6H:
773772
case CMP_FORMAT_BC6H_SF:
774773
case CMP_FORMAT_ETC_RGB:

cmp_compressonatorlib/bc7/codec_bc7.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ unsigned int BC7ThreadProcEncode(void* param)
8383
// Construction/Destruction
8484
//////////////////////////////////////////////////////////////////////////////
8585

86-
CCodec_BC7::CCodec_BC7(CodecType codecType)
87-
: CCodec_DXTC(codecType) {
86+
CCodec_BC7::CCodec_BC7()
87+
: CCodec_DXTC(CT_BC7)
8888
{
8989
m_LibraryInitialized = false;
9090

cmp_compressonatorlib/bc7/codec_bc7.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ struct BC7EncodeThreadParam
5858
class CCodec_BC7 : public CCodec_DXTC
5959
{
6060
public:
61-
CCodec_BC7(CodecType codecType);
61+
CCodec_BC7();
6262
~CCodec_BC7();
6363

6464
virtual bool SetParameter(const CMP_CHAR* pszParamName, CMP_CHAR* sValue);

cmp_compressonatorlib/common/codec.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,7 @@ CCodec* CreateCodec(CodecType nCodecType)
234234
case CT_BC6H_SF:
235235
return new CCodec_BC6H(nCodecType);
236236
case CT_BC7:
237-
case CT_BC7_SRGB:
238-
return new CCodec_BC7(nCodecType);
237+
return new CCodec_BC7;
239238
#if (OPTION_BUILD_ASTC == 1)
240239
case CT_ASTC:
241240
return new CCodec_ASTC;

cmp_compressonatorlib/compress.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ static void CMP_PrepareCMPSourceForIMG_Destination(CMP_Texture* destTexture, CMP
164164
#endif
165165
case CMP_FORMAT_BC6H:
166166
case CMP_FORMAT_BC7:
167-
case CMP_FORMAT_BC7_SRGB:
168167
case CMP_FORMAT_GT:
169168
case CMP_FORMAT_ETC_RGB:
170169
case CMP_FORMAT_ETC2_RGB:
@@ -237,7 +236,6 @@ CMP_ERROR CodecCompressTexture(const CMP_Texture* srcTexture, CMP_Texture* destT
237236
switch (destType)
238237
{
239238
case CT_BC7:
240-
case CT_BC7_SRGB:
241239
codec->SetParameter("MultiThreading", (CMP_DWORD)!options->bDisableMultiThreading);
242240

243241
if (!options->bDisableMultiThreading)
@@ -519,8 +517,6 @@ CMP_ERROR CodecCompressTextureThreaded(const CMP_Texture* srcTexture,
519517
// Note function should not be called for the following Codecs....
520518
if (destType == CT_BC7)
521519
return CMP_ABORTED;
522-
if (destType == CT_BC7_SRGB)
523-
return CMP_ABORTED;
524520
#ifdef USE_APC
525521
if (destType == CT_APC)
526522
return CMP_ABORTED;

cmp_compressonatorlib/compressonator.cpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ static void CMP_PrepareSourceForCMP_Destination(CMP_Texture* pTexture, CMP_FORMA
144144
#endif
145145
case CMP_FORMAT_BC6H:
146146
case CMP_FORMAT_BC7:
147-
case CMP_FORMAT_BC7_SRGB:
148147
case CMP_FORMAT_GT:
149148
case CMP_FORMAT_ETC_RGB:
150149
case CMP_FORMAT_ETC2_RGB:
@@ -197,7 +196,6 @@ static void CMP_PrepareSourceForCMP_Destination(CMP_Texture* pTexture, CMP_FORMA
197196
#endif
198197
case CMP_FORMAT_BC6H:
199198
case CMP_FORMAT_BC7:
200-
case CMP_FORMAT_BC7_SRGB:
201199
case CMP_FORMAT_ETC_RGB:
202200
case CMP_FORMAT_ETC2_RGB:
203201
case CMP_FORMAT_ETC2_SRGB:
@@ -246,7 +244,6 @@ static void CMP_PrepareSourceForCMP_Destination(CMP_Texture* pTexture, CMP_FORMA
246244
#endif
247245
case CMP_FORMAT_BC6H:
248246
case CMP_FORMAT_BC7:
249-
case CMP_FORMAT_BC7_SRGB:
250247
case CMP_FORMAT_ETC_RGB:
251248
case CMP_FORMAT_ETC2_RGB:
252249
case CMP_FORMAT_ETC2_SRGB:
@@ -385,7 +382,7 @@ CMP_ERROR CMP_API CMP_ConvertTexture(CMP_Texture* pSourceTexture,
385382
#if (OPTION_BUILD_ASTC == 1)
386383
(destType != CT_ASTC) &&
387384
#endif
388-
(destType != CT_BC7) && (destType != CT_BC7_SRGB) && (destType != CT_BC6H) && (destType != CT_BC6H_SF)
385+
(destType != CT_BC7) && (destType != CT_BC6H) && (destType != CT_BC6H_SF)
389386
#ifdef USE_APC
390387
&& (destType != CT_APC)
391388
#endif

0 commit comments

Comments
 (0)