Skip to content

Commit 2aef60c

Browse files
committed
Support ETC2 texture format.
1 parent 54f13c8 commit 2aef60c

File tree

13 files changed

+154
-24
lines changed

13 files changed

+154
-24
lines changed

Graphics/GraphicsAccessories/src/GraphicsAccessories.cpp

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,13 @@ class TexFormatToViewFormatConverter
216216
INIT_TEX_VIEW_FORMAT_INFO(TEX_FORMAT_BC7_TYPELESS, BC7_UNORM_SRGB, UNKNOWN, UNKNOWN, UNKNOWN);
217217
INIT_TEX_VIEW_FORMAT_INFO(TEX_FORMAT_BC7_UNORM, BC7_UNORM, UNKNOWN, UNKNOWN, UNKNOWN);
218218
INIT_TEX_VIEW_FORMAT_INFO(TEX_FORMAT_BC7_UNORM_SRGB, BC7_UNORM_SRGB, UNKNOWN, UNKNOWN, UNKNOWN);
219+
220+
INIT_TEX_VIEW_FORMAT_INFO(TEX_FORMAT_ETC2_RGB8_UNORM, ETC2_RGB8_UNORM, UNKNOWN, UNKNOWN, UNKNOWN);
221+
INIT_TEX_VIEW_FORMAT_INFO(TEX_FORMAT_ETC2_RGB8_UNORM_SRGB, ETC2_RGB8_UNORM_SRGB, UNKNOWN, UNKNOWN, UNKNOWN);
222+
INIT_TEX_VIEW_FORMAT_INFO(TEX_FORMAT_ETC2_RGB8A1_UNORM, ETC2_RGB8A1_UNORM, UNKNOWN, UNKNOWN, UNKNOWN);
223+
INIT_TEX_VIEW_FORMAT_INFO(TEX_FORMAT_ETC2_RGB8A1_UNORM_SRGB, ETC2_RGB8A1_UNORM_SRGB, UNKNOWN, UNKNOWN, UNKNOWN);
224+
INIT_TEX_VIEW_FORMAT_INFO(TEX_FORMAT_ETC2_RGBA8_UNORM, ETC2_RGBA8_UNORM, UNKNOWN, UNKNOWN, UNKNOWN);
225+
INIT_TEX_VIEW_FORMAT_INFO(TEX_FORMAT_ETC2_RGBA8_UNORM_SRGB, ETC2_RGBA8_UNORM_SRGB, UNKNOWN, UNKNOWN, UNKNOWN);
219226
#undef INIT_TVIEW_FORMAT_INFO
220227
// clang-format on
221228

@@ -399,9 +406,16 @@ const TextureFormatAttribs& GetTextureFormatAttribs(TEXTURE_FORMAT Format)
399406
INIT_TEX_FORMAT_INFO(TEX_FORMAT_BC7_TYPELESS, 16, 4, COMPONENT_TYPE_COMPRESSED, true, 4,4);
400407
INIT_TEX_FORMAT_INFO(TEX_FORMAT_BC7_UNORM, 16, 4, COMPONENT_TYPE_COMPRESSED, false, 4,4);
401408
INIT_TEX_FORMAT_INFO(TEX_FORMAT_BC7_UNORM_SRGB, 16, 4, COMPONENT_TYPE_COMPRESSED, false, 4,4);
409+
410+
INIT_TEX_FORMAT_INFO(TEX_FORMAT_ETC2_RGB8_UNORM, 8, 3, COMPONENT_TYPE_COMPRESSED, false, 4,4);
411+
INIT_TEX_FORMAT_INFO(TEX_FORMAT_ETC2_RGB8_UNORM_SRGB, 8, 3, COMPONENT_TYPE_COMPRESSED, false, 4,4);
412+
INIT_TEX_FORMAT_INFO(TEX_FORMAT_ETC2_RGB8A1_UNORM, 8, 4, COMPONENT_TYPE_COMPRESSED, false, 4,4);
413+
INIT_TEX_FORMAT_INFO(TEX_FORMAT_ETC2_RGB8A1_UNORM_SRGB, 8, 4, COMPONENT_TYPE_COMPRESSED, false, 4,4);
414+
INIT_TEX_FORMAT_INFO(TEX_FORMAT_ETC2_RGBA8_UNORM, 16, 4, COMPONENT_TYPE_COMPRESSED, false, 4,4);
415+
INIT_TEX_FORMAT_INFO(TEX_FORMAT_ETC2_RGBA8_UNORM_SRGB, 16, 4, COMPONENT_TYPE_COMPRESSED, false, 4,4);
402416
#undef INIT_TEX_FORMAT_INFO
403417
// clang-format on
404-
static_assert(TEX_FORMAT_NUM_FORMATS == TEX_FORMAT_BC7_UNORM_SRGB + 1, "Not all texture formats initialized.");
418+
static_assert(TEX_FORMAT_NUM_FORMATS == TEX_FORMAT_ETC2_RGBA8_UNORM_SRGB + 1, "Not all texture formats initialized.");
405419

406420
#ifdef DILIGENT_DEBUG
407421
for (Uint32 Fmt = TEX_FORMAT_UNKNOWN; Fmt < TEX_FORMAT_NUM_FORMATS; ++Fmt)
@@ -2568,6 +2582,15 @@ TEXTURE_FORMAT UnormFormatToSRGB(TEXTURE_FORMAT Fmt)
25682582
case TEX_FORMAT_BC7_UNORM:
25692583
return TEX_FORMAT_BC7_UNORM_SRGB;
25702584

2585+
case TEX_FORMAT_ETC2_RGB8_UNORM:
2586+
return TEX_FORMAT_ETC2_RGB8_UNORM_SRGB;
2587+
2588+
case TEX_FORMAT_ETC2_RGB8A1_UNORM:
2589+
return TEX_FORMAT_ETC2_RGB8A1_UNORM_SRGB;
2590+
2591+
case TEX_FORMAT_ETC2_RGBA8_UNORM:
2592+
return TEX_FORMAT_ETC2_RGBA8_UNORM_SRGB;
2593+
25712594
default:
25722595
return Fmt;
25732596
}
@@ -2598,6 +2621,15 @@ TEXTURE_FORMAT SRGBFormatToUnorm(TEXTURE_FORMAT Fmt)
25982621
case TEX_FORMAT_BC7_UNORM_SRGB:
25992622
return TEX_FORMAT_BC7_UNORM;
26002623

2624+
case TEX_FORMAT_ETC2_RGB8_UNORM_SRGB:
2625+
return TEX_FORMAT_ETC2_RGB8_UNORM;
2626+
2627+
case TEX_FORMAT_ETC2_RGB8A1_UNORM_SRGB:
2628+
return TEX_FORMAT_ETC2_RGB8A1_UNORM;
2629+
2630+
case TEX_FORMAT_ETC2_RGBA8_UNORM_SRGB:
2631+
return TEX_FORMAT_ETC2_RGBA8_UNORM;
2632+
26012633
default:
26022634
return Fmt;
26032635
}
@@ -2660,7 +2692,10 @@ bool IsSRGBFormat(TEXTURE_FORMAT Fmt)
26602692
Fmt == TEX_FORMAT_BC3_UNORM_SRGB ||
26612693
Fmt == TEX_FORMAT_BGRA8_UNORM_SRGB ||
26622694
Fmt == TEX_FORMAT_BGRX8_UNORM_SRGB ||
2663-
Fmt == TEX_FORMAT_BC7_UNORM_SRGB);
2695+
Fmt == TEX_FORMAT_BC7_UNORM_SRGB ||
2696+
Fmt == TEX_FORMAT_ETC2_RGB8_UNORM_SRGB ||
2697+
Fmt == TEX_FORMAT_ETC2_RGB8A1_UNORM_SRGB ||
2698+
Fmt == TEX_FORMAT_ETC2_RGBA8_UNORM_SRGB);
26642699
}
26652700

26662701
String GetPipelineShadingRateFlagsString(PIPELINE_SHADING_RATE_FLAGS Flags)

Graphics/GraphicsEngine/interface/GraphicsTypes.h

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,6 +906,30 @@ DILIGENT_TYPED_ENUM(TEXTURE_FORMAT, Uint16)
906906
/// <a href = "https://www.opengl.org/wiki/BPTC_Texture_Compression">BPTC Texture Compression on OpenGL.org </a>
907907
TEX_FORMAT_BC7_UNORM_SRGB,
908908

909+
/// Three-component block-compression unsigned-normalized-integer format. \n
910+
/// OpenGL counterpart: GL_COMPRESSED_RGB8_ETC2.
911+
TEX_FORMAT_ETC2_RGB8_UNORM,
912+
913+
/// Three-component block-compression unsigned-normalized-integer sRGB format. \n
914+
/// OpenGL counterpart: GL_COMPRESSED_SRGB8_ETC2.
915+
TEX_FORMAT_ETC2_RGB8_UNORM_SRGB,
916+
917+
/// Four-component block-compression unsigned-normalized-integer format. \n
918+
/// OpenGL counterpart: GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2.
919+
TEX_FORMAT_ETC2_RGB8A1_UNORM,
920+
921+
/// Four-component block-compression unsigned-normalized-integer sRGB format. \n
922+
/// OpenGL counterpart: GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2.
923+
TEX_FORMAT_ETC2_RGB8A1_UNORM_SRGB,
924+
925+
/// Four-component block-compression unsigned-normalized-integer format. \n
926+
/// OpenGL counterpart: GL_COMPRESSED_RGBA8_ETC2_EAC.
927+
TEX_FORMAT_ETC2_RGBA8_UNORM,
928+
929+
/// Four-component block-compression unsigned-normalized-integer sRGB format. \n
930+
/// OpenGL counterpart: GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC.
931+
TEX_FORMAT_ETC2_RGBA8_UNORM_SRGB,
932+
909933
/// Helper member containing the total number of texture formats in the enumeration
910934
TEX_FORMAT_NUM_FORMATS
911935
};
@@ -1704,6 +1728,9 @@ struct DeviceFeatures
17041728
/// Indicates if device supports all BC-compressed formats
17051729
DEVICE_FEATURE_STATE TextureCompressionBC DEFAULT_INITIALIZER(DEVICE_FEATURE_STATE_DISABLED);
17061730

1731+
/// Indicates if device supports all ETC-compressed formats
1732+
DEVICE_FEATURE_STATE TextureCompressionETC2 DEFAULT_INITIALIZER(DEVICE_FEATURE_STATE_DISABLED);
1733+
17071734
/// Indicates if device supports writes to UAVs as well as atomic operations in vertex,
17081735
/// tessellation, and geometry shader stages.
17091736
DEVICE_FEATURE_STATE VertexPipelineUAVWritesAndAtomics DEFAULT_INITIALIZER(DEVICE_FEATURE_STATE_DISABLED);
@@ -1852,6 +1879,7 @@ struct DeviceFeatures
18521879
Handler(DualSourceBlend) \
18531880
Handler(MultiViewport) \
18541881
Handler(TextureCompressionBC) \
1882+
Handler(TextureCompressionETC2) \
18551883
Handler(VertexPipelineUAVWritesAndAtomics) \
18561884
Handler(PixelUAVWritesAndAtomics) \
18571885
Handler(TextureUAVExtendedFormats) \
@@ -1880,7 +1908,7 @@ struct DeviceFeatures
18801908

18811909
explicit constexpr DeviceFeatures(DEVICE_FEATURE_STATE State) noexcept
18821910
{
1883-
static_assert(sizeof(*this) == 46, "Did you add a new feature to DeviceFeatures? Please add it to ENUMERATE_DEVICE_FEATURES.");
1911+
static_assert(sizeof(*this) == 47, "Did you add a new feature to DeviceFeatures? Please add it to ENUMERATE_DEVICE_FEATURES.");
18841912
#define INIT_FEATURE(Feature) Feature = State;
18851913
ENUMERATE_DEVICE_FEATURES(INIT_FEATURE)
18861914
#undef INIT_FEATURE

Graphics/GraphicsEngine/src/RenderDeviceBase.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ DeviceFeatures EnableDeviceFeatures(const DeviceFeatures& SupportedFeatures,
9393
ENABLE_FEATURE(DualSourceBlend, "Dual-source blend is");
9494
ENABLE_FEATURE(MultiViewport, "Multiviewport is");
9595
ENABLE_FEATURE(TextureCompressionBC, "BC texture compression is");
96+
ENABLE_FEATURE(TextureCompressionETC2, "ETC texture compression is");
9697
ENABLE_FEATURE(VertexPipelineUAVWritesAndAtomics, "Vertex pipeline UAV writes and atomics are");
9798
ENABLE_FEATURE(PixelUAVWritesAndAtomics, "Pixel UAV writes and atomics are");
9899
ENABLE_FEATURE(TextureUAVExtendedFormats, "Texture UAV extended formats are");
@@ -121,7 +122,7 @@ DeviceFeatures EnableDeviceFeatures(const DeviceFeatures& SupportedFeatures,
121122
// clang-format on
122123
#undef ENABLE_FEATURE
123124

124-
ASSERT_SIZEOF(DeviceFeatures, 46, "Did you add a new feature to DeviceFeatures? Please handle its status here (if necessary).");
125+
ASSERT_SIZEOF(DeviceFeatures, 47, "Did you add a new feature to DeviceFeatures? Please handle its status here (if necessary).");
125126

126127
return EnabledFeatures;
127128
}

Graphics/GraphicsEngineD3D11/src/EngineFactoryD3D11.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ GraphicsAdapterInfo EngineFactoryD3D11Impl::GetGraphicsAdapterInfo(void*
456456
Features.ShaderFloat16 = ShaderFloat16Supported ? DEVICE_FEATURE_STATE_ENABLED : DEVICE_FEATURE_STATE_DISABLED;
457457
}
458458

459-
ASSERT_SIZEOF(Features, 46, "Did you add a new feature to DeviceFeatures? Please handle its status here.");
459+
ASSERT_SIZEOF(Features, 47, "Did you add a new feature to DeviceFeatures? Please handle its status here.");
460460

461461
// Texture properties
462462
{

Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1067,7 +1067,7 @@ GraphicsAdapterInfo EngineFactoryD3D12Impl::GetGraphicsAdapterInfo(void*
10671067
ASSERT_SIZEOF(DrawCommandProps, 12, "Did you add a new member to DrawCommandProperties? Please initialize it here.");
10681068
}
10691069

1070-
ASSERT_SIZEOF(DeviceFeatures, 46, "Did you add a new feature to DeviceFeatures? Please handle its status here.");
1070+
ASSERT_SIZEOF(DeviceFeatures, 47, "Did you add a new feature to DeviceFeatures? Please handle its status here.");
10711071

10721072
return AdapterInfo;
10731073
}

Graphics/GraphicsEngineD3DBase/src/DXGITypeConversions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,13 +407,13 @@ DXGI_FORMAT TexFormatToDXGI_Format(TEXTURE_FORMAT TexFormat, Uint32 BindFlags)
407407
FmtToDXGIFmtMap[TEX_FORMAT_BC7_UNORM_SRGB] = DXGI_FORMAT_BC7_UNORM_SRGB;
408408
// clang-format on
409409

410+
static_assert(TEX_FORMAT_NUM_FORMATS == 106, "Please enter the new format information above");
410411
bFormatMapInitialized = true;
411412
}
412413

413414
if (TexFormat >= TEX_FORMAT_UNKNOWN && TexFormat < TEX_FORMAT_NUM_FORMATS)
414415
{
415416
auto DXGIFormat = FmtToDXGIFmtMap[TexFormat];
416-
VERIFY(TexFormat == TEX_FORMAT_UNKNOWN || DXGIFormat != DXGI_FORMAT_UNKNOWN, "Unsupported texture format");
417417
if (BindFlags != 0)
418418
DXGIFormat = CorrectDXGIFormat(DXGIFormat, BindFlags);
419419
return DXGIFormat;

Graphics/GraphicsEngineOpenGL/src/GLTypeConversions.cpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,15 @@ class FormatToGLInternalTexFormatMap
167167
m_FmtToGLFmtMap[TEX_FORMAT_BC7_TYPELESS] = GL_COMPRESSED_RGBA_BPTC_UNORM;
168168
m_FmtToGLFmtMap[TEX_FORMAT_BC7_UNORM] = GL_COMPRESSED_RGBA_BPTC_UNORM;
169169
m_FmtToGLFmtMap[TEX_FORMAT_BC7_UNORM_SRGB] = GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM;
170+
m_FmtToGLFmtMap[TEX_FORMAT_ETC2_RGB8_UNORM] = GL_COMPRESSED_RGB8_ETC2;
171+
m_FmtToGLFmtMap[TEX_FORMAT_ETC2_RGB8_UNORM_SRGB] = GL_COMPRESSED_SRGB8_ETC2;
172+
m_FmtToGLFmtMap[TEX_FORMAT_ETC2_RGB8A1_UNORM] = GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2;
173+
m_FmtToGLFmtMap[TEX_FORMAT_ETC2_RGB8A1_UNORM_SRGB] = GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2;
174+
m_FmtToGLFmtMap[TEX_FORMAT_ETC2_RGBA8_UNORM] = GL_COMPRESSED_RGBA8_ETC2_EAC;
175+
m_FmtToGLFmtMap[TEX_FORMAT_ETC2_RGBA8_UNORM_SRGB] = GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC;
170176
// clang-format on
171177

172-
static_assert(TEX_FORMAT_NUM_FORMATS == 100, "Please enter the new format information above");
178+
static_assert(TEX_FORMAT_NUM_FORMATS == 106, "Please enter the new format information above");
173179
}
174180

175181
GLenum operator[](TEXTURE_FORMAT TexFormat) const
@@ -412,6 +418,12 @@ NativePixelAttribs GetNativePixelTransferAttribs(TEXTURE_FORMAT TexFormat)
412418
FmtToGLPixelFmt[TEX_FORMAT_BC7_TYPELESS] = NativePixelAttribs{GL_RGBA, 0, True};
413419
FmtToGLPixelFmt[TEX_FORMAT_BC7_UNORM] = NativePixelAttribs{GL_RGBA, 0, True};
414420
FmtToGLPixelFmt[TEX_FORMAT_BC7_UNORM_SRGB] = NativePixelAttribs{GL_RGBA, 0, True};
421+
FmtToGLPixelFmt[TEX_FORMAT_ETC2_RGB8_UNORM] = NativePixelAttribs{GL_RGB, 0, True};
422+
FmtToGLPixelFmt[TEX_FORMAT_ETC2_RGB8_UNORM_SRGB] = NativePixelAttribs{GL_RGB, 0, True};
423+
FmtToGLPixelFmt[TEX_FORMAT_ETC2_RGB8A1_UNORM] = NativePixelAttribs{GL_RGBA, 0, True};
424+
FmtToGLPixelFmt[TEX_FORMAT_ETC2_RGB8A1_UNORM_SRGB] = NativePixelAttribs{GL_RGBA, 0, True};
425+
FmtToGLPixelFmt[TEX_FORMAT_ETC2_RGBA8_UNORM] = NativePixelAttribs{GL_RGBA, 0, True};
426+
FmtToGLPixelFmt[TEX_FORMAT_ETC2_RGBA8_UNORM_SRGB] = NativePixelAttribs{GL_RGBA, 0, True};
415427
// clang-format on
416428
bAttribsMapInitialized = true;
417429
}

Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1009,6 +1009,13 @@ void RenderDeviceGLImpl::InitAdapterInfo()
10091009
const bool bS3TC = CheckExtension("GL_EXT_texture_compression_s3tc") || CheckExtension("GL_WEBGL_compressed_texture_s3tc");
10101010
ENABLE_FEATURE(TextureCompressionBC, bRGTC && bBPTC && bS3TC);
10111011

1012+
#if PLATFORM_EMSCRIPTEN
1013+
const bool bETC2 = CheckExtension("GL_WEBGL_compressed_texture_etc");
1014+
#else
1015+
const bool bETC2 = m_DeviceInfo.Type == RENDER_DEVICE_TYPE_GLES || CheckExtension("GL_ARB_ES3_compatibility");
1016+
#endif
1017+
ENABLE_FEATURE(TextureCompressionETC2, bETC2);
1018+
10121019
// Buffer properties
10131020
{
10141021
auto& BufferProps{m_AdapterInfo.Buffer};
@@ -1108,7 +1115,7 @@ void RenderDeviceGLImpl::InitAdapterInfo()
11081115
m_AdapterInfo.Queues[0].TextureCopyGranularity[2] = 1;
11091116
}
11101117

1111-
ASSERT_SIZEOF(DeviceFeatures, 46, "Did you add a new feature to DeviceFeatures? Please handle its status here.");
1118+
ASSERT_SIZEOF(DeviceFeatures, 47, "Did you add a new feature to DeviceFeatures? Please handle its status here.");
11121119
}
11131120

11141121
void RenderDeviceGLImpl::FlagSupportedTexFormats()
@@ -1123,6 +1130,12 @@ void RenderDeviceGLImpl::FlagSupportedTexFormats()
11231130
const bool bTexNorm16 = bDekstopGL || CheckExtension("GL_EXT_texture_norm16"); // Only for ES3.1+
11241131
const bool bTexSwizzle = bDekstopGL || bGLES30OrAbove || CheckExtension("GL_ARB_texture_swizzle");
11251132

1133+
#if PLATFORM_EMSCRIPTEN
1134+
const bool bETC2 = CheckExtension("GL_WEBGL_compressed_texture_etc");
1135+
#else
1136+
const bool bETC2 = bGLES30OrAbove || CheckExtension("GL_ARB_ES3_compatibility");
1137+
#endif
1138+
11261139
// || GLES3.0 || GLES3.1 || GLES3.2 ||
11271140
// | Format || CR | TF || CR | TF | Req RB | Req. Tex || CR | TF | Req RB | Req. Tex ||
11281141
// |------------||------|------||------|------|--------|----------||------|------|--------|----------||
@@ -1306,6 +1319,13 @@ void RenderDeviceGLImpl::FlagSupportedTexFormats()
13061319
FlagFormat(TEX_FORMAT_BC7_TYPELESS, bBPTC);
13071320
FlagFormat(TEX_FORMAT_BC7_UNORM, bBPTC, BIND_SHADER_RESOURCE, true);
13081321
FlagFormat(TEX_FORMAT_BC7_UNORM_SRGB, bBPTC, BIND_SHADER_RESOURCE, true);
1322+
1323+
FlagFormat(TEX_FORMAT_ETC2_RGB8_UNORM, bETC2, BIND_SHADER_RESOURCE, true);
1324+
FlagFormat(TEX_FORMAT_ETC2_RGB8_UNORM_SRGB, bETC2, BIND_SHADER_RESOURCE, true);
1325+
FlagFormat(TEX_FORMAT_ETC2_RGB8A1_UNORM, bETC2, BIND_SHADER_RESOURCE, true);
1326+
FlagFormat(TEX_FORMAT_ETC2_RGB8A1_UNORM_SRGB, bETC2, BIND_SHADER_RESOURCE, true);
1327+
FlagFormat(TEX_FORMAT_ETC2_RGBA8_UNORM, bETC2, BIND_SHADER_RESOURCE, true);
1328+
FlagFormat(TEX_FORMAT_ETC2_RGBA8_UNORM_SRGB, bETC2, BIND_SHADER_RESOURCE, true);
13091329
// clang-format on
13101330

13111331
#ifdef DILIGENT_DEVELOPMENT

Graphics/GraphicsEngineVulkan/src/EngineFactoryVk.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,7 @@ void EngineFactoryVkImpl::CreateDeviceAndContextsVk(const EngineVkCreateInfo& En
793793
ENABLE_VKFEATURE(dualSrcBlend, EnabledFeatures.DualSourceBlend);
794794
ENABLE_VKFEATURE(multiViewport, EnabledFeatures.MultiViewport);
795795
ENABLE_VKFEATURE(textureCompressionBC, EnabledFeatures.TextureCompressionBC);
796+
ENABLE_VKFEATURE(textureCompressionETC2, EnabledFeatures.TextureCompressionETC2);
796797
ENABLE_VKFEATURE(vertexPipelineStoresAndAtomics, EnabledFeatures.VertexPipelineUAVWritesAndAtomics);
797798
ENABLE_VKFEATURE(fragmentStoresAndAtomics, EnabledFeatures.PixelUAVWritesAndAtomics);
798799
ENABLE_VKFEATURE(shaderStorageImageExtendedFormats, EnabledFeatures.TextureUAVExtendedFormats);
@@ -1170,7 +1171,7 @@ void EngineFactoryVkImpl::CreateDeviceAndContextsVk(const EngineVkCreateInfo& En
11701171
LOG_ERROR_MESSAGE("Can not enable extended device features when VK_KHR_get_physical_device_properties2 extension is not supported by device");
11711172
}
11721173

1173-
ASSERT_SIZEOF(DeviceFeatures, 46, "Did you add a new feature to DeviceFeatures? Please handle its status here.");
1174+
ASSERT_SIZEOF(DeviceFeatures, 47, "Did you add a new feature to DeviceFeatures? Please handle its status here.");
11741175

11751176
for (Uint32 i = 0; i < EngineCI.DeviceExtensionCount; ++i)
11761177
{

0 commit comments

Comments
 (0)