Implement RGTC (BC4, BC5) compressed texture formats

gl.xml was modified as two enums were missing from their proper group.
dxgi_support_data.json was fixed to not expect BC4 and BC5 on FL9_3

Bug: angleproject:3149
Change-Id: Ieb97a8cf8e92258c1b44e090e823fac227997174
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2033068
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
This commit is contained in:
Alexey Knyazev 2020-01-31 19:03:12 +04:00 коммит произвёл Commit Bot
Родитель 4933d9d2d6
Коммит 58fc8b11cf
54 изменённых файлов: 472 добавлений и 86 удалений

Просмотреть файл

@ -34,6 +34,7 @@ Samsung Electronics, Inc.
Arm Ltd.
Broadcom Inc.
Facebook, Inc.
The Khronos Group, Inc.
Jacek Caban
Mark Callow

Просмотреть файл

@ -174,3 +174,6 @@ Broadcom Inc.
Facebook, Inc.
Artem Bolgar
The Khronos Group, Inc.
Alexey Knyazev

Просмотреть файл

@ -1,14 +1,14 @@
{
"src/libANGLE/renderer/FormatID_autogen.h":
"6df4632c2908751635396a073c206da6",
"24fdce4072d7f9e76337ffbe4c58b4ab",
"src/libANGLE/renderer/Format_table_autogen.cpp":
"69d5325f5a71af4d7a5017b0a85743a4",
"894eaa150949d32c563e94024312295d",
"src/libANGLE/renderer/angle_format.py":
"32ba71942c0fd00e6807104f1bb80a3c",
"src/libANGLE/renderer/angle_format_data.json":
"b0c39827c36941a283f679345fea6d3e",
"b8bfe470c31b12b27f3a2bdb0288e4be",
"src/libANGLE/renderer/angle_format_map.json":
"bca5e686001f6dd0af306af234a36677",
"fad58117657b6bde9488a10d35872d45",
"src/libANGLE/renderer/gen_angle_format_table.py":
"8e349a643e81a028ebb54bde3756f9f7"
}

Просмотреть файл

@ -4,7 +4,7 @@
"src/libANGLE/renderer/gen_load_functions_table.py":
"9b4ea6bcb4eb4c43f48a097a9ec920f1",
"src/libANGLE/renderer/load_functions_data.json":
"9c4f8ff5ef6cab7b22fe76bce643fadd",
"ca62fd90cb56197b2d3f78f8e2aba5e0",
"src/libANGLE/renderer/load_functions_table_autogen.cpp":
"2cccad635bba34a8e2ee7ef26c13649f"
"9500f5e87cc7ae604c40168895b41590"
}

Просмотреть файл

@ -4,9 +4,9 @@
"src/libANGLE/renderer/d3d/d3d11/gen_texture_format_table.py":
"bf11e3404d4622059b6e9c4e96abf95e",
"src/libANGLE/renderer/d3d/d3d11/texture_format_data.json":
"d7483ece817e819588f4ca157716dc7b",
"c80708c18348fd89a3b918e58e74c1f8",
"src/libANGLE/renderer/d3d/d3d11/texture_format_map.json":
"e9dfbd51ff183809f595f8fc5db9c217",
"src/libANGLE/renderer/d3d/d3d11/texture_format_table_autogen.cpp":
"03d2b85db28de5c94f1e38d2ed4ee385"
"f48864159c3a1fe6ca7567e3eb8215fb"
}

Просмотреть файл

@ -2,11 +2,11 @@
"src/libANGLE/renderer/angle_format.py":
"32ba71942c0fd00e6807104f1bb80a3c",
"src/libANGLE/renderer/angle_format_map.json":
"bca5e686001f6dd0af306af234a36677",
"fad58117657b6bde9488a10d35872d45",
"src/libANGLE/renderer/d3d/d3d11/dxgi_format_data.json":
"24f525b05dc665fbbc8c6d68fb863719",
"3428e4761ccd05f960adffd6ccbd86c5",
"src/libANGLE/renderer/d3d/d3d11/dxgi_format_map_autogen.cpp":
"32b9860e3fd8e87a89ff9a09e848e516",
"974308ca798476dfaa076fb864478310",
"src/libANGLE/renderer/d3d/d3d11/gen_dxgi_format_table.py":
"411e6064b916d570fa76949820d34a45"
}

Просмотреть файл

@ -1,8 +1,8 @@
{
"src/libANGLE/renderer/d3d/d3d11/dxgi_support_data.json":
"09195053f8829fc81efe08229b54a8b5",
"861037ff2340dd52e713c7b7283609bd",
"src/libANGLE/renderer/d3d/d3d11/dxgi_support_table_autogen.cpp":
"7ec32ce0ad41450be7493c1db1130e25",
"3f32eabe4360e35d076265a6a14d9aa5",
"src/libANGLE/renderer/d3d/d3d11/gen_dxgi_support_tables.py":
"b464f153f15d60df1c6536adbfafb072"
}

Просмотреть файл

@ -6,7 +6,7 @@
"scripts/generate_loader.py":
"48c60c668bec42a80378179aae2acc61",
"scripts/registry_xml.py":
"467ae1a9988049a429d8202e5d2cf73c",
"1cf8c2638c7a2ea439f79d3ba05592bd",
"scripts/wgl.xml":
"aa96419c582af2f6673430e2847693f4",
"src/libEGL/egl_loader_autogen.cpp":

Просмотреть файл

@ -8,11 +8,11 @@
"scripts/generate_entry_points.py":
"36f89f5514fff27ecb4baeded89ae64d",
"scripts/gl.xml":
"c4a3213e606d844e812883fd729c4fd3",
"2af7b077ec347349b3a92683e8fb8b03",
"scripts/gl_angle_ext.xml":
"d6907cd84d95ac0b32a164194eadcf53",
"scripts/registry_xml.py":
"467ae1a9988049a429d8202e5d2cf73c",
"1cf8c2638c7a2ea439f79d3ba05592bd",
"scripts/wgl.xml":
"aa96419c582af2f6673430e2847693f4",
"src/libANGLE/Context_gl_1_0_autogen.h":
@ -64,7 +64,7 @@
"src/libANGLE/Context_gles_3_2_autogen.h":
"8ab4576d737d46e2ee666c26c01ae608",
"src/libANGLE/Context_gles_ext_autogen.h":
"d09ef97338af1d5d26836d08bf9cf982",
"d4d23031a26b698adc287504d9f14681",
"src/libANGLE/capture_gles_1_0_autogen.cpp":
"96fc0f501e2e696ab911dad8b400dfb2",
"src/libANGLE/capture_gles_1_0_autogen.h":
@ -88,7 +88,7 @@
"src/libANGLE/capture_gles_ext_autogen.cpp":
"e24130b78c56dd362587bb9e27fcaeee",
"src/libANGLE/capture_gles_ext_autogen.h":
"677b58c112c009ff422839a4025cdc83",
"08281242dfb534b4297bb817b718f46a",
"src/libANGLE/entry_points_enum_autogen.cpp":
"0881562de1b624c73e9e0bda9fb843b5",
"src/libANGLE/entry_points_enum_autogen.h":
@ -110,7 +110,7 @@
"src/libANGLE/validationES3_autogen.h":
"f2cd4ac4be07a5bfed51a413e2967060",
"src/libANGLE/validationESEXT_autogen.h":
"b56a0f221884ed46b3e631c300f65fd2",
"fb4e9c39c031b7de1a354183e21f45cc",
"src/libANGLE/validationGL11_autogen.h":
"043a60940daa105730e2166f0a290e2f",
"src/libANGLE/validationGL12_autogen.h":
@ -250,15 +250,15 @@
"src/libGLESv2/entry_points_gles_3_2_autogen.h":
"5798aa0a73af1d4ba5dfe99b6217a247",
"src/libGLESv2/entry_points_gles_ext_autogen.cpp":
"33f931eefd8f719a0be3290be96448af",
"9f598172ffb8b18f376af97a02aaf455",
"src/libGLESv2/entry_points_gles_ext_autogen.h":
"1cbe1eba5df527eae146cf4c4021e91a",
"6cd7104749bf62e5dcab936c18c0b142",
"src/libGLESv2/libGLESv2_autogen.cpp":
"181d2ce0efeaf2e11ab197f6458f0249",
"7212d09a6716a6673cac5a97ce3a3698",
"src/libGLESv2/libGLESv2_autogen.def":
"7db7f3a09c464ce939608d95b57d402b",
"e72f37eaa0c7e2f6acaf6f1454eb094a",
"src/libGLESv2/libGLESv2_no_capture_autogen.def":
"f0019a67bd1ae1f2745dde53f316a919",
"0213e131141ab741d5fd530e623c34e3",
"src/libGLESv2/libGLESv2_with_capture_autogen.def":
"94376e67d0c4c87d9c097cf88cdc8036"
"8a8639550b84ed42c1b4c79d15ac2553"
}

Просмотреть файл

@ -2,9 +2,9 @@
"src/libANGLE/es3_format_type_combinations.json":
"b44b222c27eea6839c0da3076ee540fc",
"src/libANGLE/format_map_autogen.cpp":
"4b9927afc6cc47fcea6bfcbcd602b6e5",
"e0dedb4a47ca7eab2d33d20430a30d05",
"src/libANGLE/format_map_data.json":
"2dd1986f49c441ad9a71b82410f57d6e",
"2edab4db12a1cc131f26e0e5680b7d0c",
"src/libANGLE/gen_format_map.py":
"38320d844e6629e09afc5ccdc484e9aa",
"src/libANGLE/renderer/angle_format.py":

Просмотреть файл

@ -2,13 +2,13 @@
"scripts/gen_gl_enum_utils.py":
"f25cdc74b57d10a1cbc4194a72e971af",
"scripts/gl.xml":
"c4a3213e606d844e812883fd729c4fd3",
"2af7b077ec347349b3a92683e8fb8b03",
"scripts/gl_angle_ext.xml":
"d6907cd84d95ac0b32a164194eadcf53",
"scripts/registry_xml.py":
"467ae1a9988049a429d8202e5d2cf73c",
"1cf8c2638c7a2ea439f79d3ba05592bd",
"src/libANGLE/gl_enum_utils_autogen.cpp":
"fc023ad21e10d2279c8f14686bf838b6",
"8f05b1da385baf8becb7a63bee468fcc",
"src/libANGLE/gl_enum_utils_autogen.h":
"dd54f34be733affcb994fc315c3b972d"
}

Просмотреть файл

@ -4,7 +4,7 @@
"src/libANGLE/renderer/metal/gen_mtl_format_table.py":
"b6468446dd1da3e44ac9dd11690b5bf1",
"src/libANGLE/renderer/metal/mtl_format_map.json":
"0166b70697732612bd46942e7ccf8e6e",
"223e0b729f5df7d91af382fa3af32254",
"src/libANGLE/renderer/metal/mtl_format_table_autogen.mm":
"8796be69461e2bb07db3b81b6ef24432"
"d924184394625032e8a3e97c8b936a5f"
}

Просмотреть файл

@ -1,18 +1,18 @@
{
"scripts/gl.xml":
"c4a3213e606d844e812883fd729c4fd3",
"2af7b077ec347349b3a92683e8fb8b03",
"src/libANGLE/renderer/angle_format.py":
"32ba71942c0fd00e6807104f1bb80a3c",
"src/libANGLE/renderer/gl/DispatchTableGL_autogen.cpp":
"ea253c245e64fd67c55904fd28173997",
"96ce3c7c5ad179d7893017770354ce51",
"src/libANGLE/renderer/gl/DispatchTableGL_autogen.h":
"27af4da77c5cc60708fd2aabedc983f7",
"175946b4d8e0e7ce161f97a2244c1283",
"src/libANGLE/renderer/gl/generate_gl_dispatch_table.py":
"4f19a7eee17679b3a0ad4abad6fab2c9",
"src/libANGLE/renderer/gl/gl_bindings_data.json":
"e870a4d86dc69e52dcab9afd78a47c9b",
"src/libANGLE/renderer/gl/null_functions.cpp":
"80406da03a9500023f196a70144f1059",
"93ce4fd50259c693a34c9940b33a7822",
"src/libANGLE/renderer/gl/null_functions.h":
"773950879f646085f78b89fe6a2daf5d"
"d281ba915f4be744c7d519f3c6a1b84d"
}

Просмотреть файл

@ -2,11 +2,11 @@
"src/libANGLE/renderer/angle_format.py":
"32ba71942c0fd00e6807104f1bb80a3c",
"src/libANGLE/renderer/angle_format_map.json":
"bca5e686001f6dd0af306af234a36677",
"fad58117657b6bde9488a10d35872d45",
"src/libANGLE/renderer/vulkan/gen_vk_format_table.py":
"d8a0f2278c09a49049a73930b9da3719",
"src/libANGLE/renderer/vulkan/vk_format_map.json":
"70213e23a9a2246a69ba1b2eb8edb133",
"e203fb283bfb2f0c446d523f7b290af6",
"src/libANGLE/renderer/vulkan/vk_format_table_autogen.cpp":
"5e03a1d5168224f9a54206239418d2f4"
"a77060d7b772d1a94bdd32ce4b31399e"
}

Просмотреть файл

@ -6,11 +6,11 @@
"scripts/gen_proc_table.py":
"24dbcc78fd3f000f58ca98237ccc0da4",
"scripts/gl.xml":
"c4a3213e606d844e812883fd729c4fd3",
"2af7b077ec347349b3a92683e8fb8b03",
"scripts/gl_angle_ext.xml":
"d6907cd84d95ac0b32a164194eadcf53",
"scripts/registry_xml.py":
"467ae1a9988049a429d8202e5d2cf73c",
"1cf8c2638c7a2ea439f79d3ba05592bd",
"scripts/wgl.xml":
"aa96419c582af2f6673430e2847693f4",
"src/libGL/proc_table_wgl_autogen.cpp":

Просмотреть файл

@ -1830,7 +1830,9 @@ typedef unsigned int GLhandleARB;
<enum name="GL_COMPRESSED_R11_EAC"/>
<enum name="GL_COMPRESSED_SIGNED_R11_EAC"/>
<enum name="GL_COMPRESSED_RG_RGTC2"/>
<enum name="GL_COMPRESSED_RED_GREEN_RGTC2_EXT"/>
<enum name="GL_COMPRESSED_SIGNED_RG_RGTC2"/>
<enum name="GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT"/>
<enum name="GL_COMPRESSED_RGBA_BPTC_UNORM"/>
<enum name="GL_COMPRESSED_RGBA_BPTC_UNORM_ARB"/>
<enum name="GL_COMPRESSED_RGBA_BPTC_UNORM_EXT"/>

Просмотреть файл

@ -79,6 +79,7 @@ gles_extensions = [
"GL_EXT_sRGB",
"GL_EXT_texture_compression_bptc",
"GL_EXT_texture_compression_dxt1",
"GL_EXT_texture_compression_rgtc",
"GL_EXT_texture_compression_s3tc",
"GL_EXT_texture_compression_s3tc_srgb",
"GL_EXT_texture_filter_anisotropic",

Просмотреть файл

@ -712,6 +712,16 @@ static bool DetermineTextureNorm16Support(const TextureCapsMap &textureCaps)
GetFormatSupport(textureCaps, requiredRenderFormats, true, false, true, true, false);
}
// Check for EXT_texture_compression_rgtc support
static bool DetermineRGTCTextureSupport(const TextureCapsMap &textureCaps)
{
constexpr GLenum requiredFormats[] = {
GL_COMPRESSED_RED_RGTC1_EXT, GL_COMPRESSED_SIGNED_RED_RGTC1_EXT,
GL_COMPRESSED_RED_GREEN_RGTC2_EXT, GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT};
return GetFormatSupport(textureCaps, requiredFormats, true, true, false, false, false);
}
// Check for EXT_texture_compression_bptc support
static bool DetermineBPTCTextureSupport(const TextureCapsMap &textureCaps)
{
@ -806,6 +816,7 @@ void Extensions::setTextureExtensionSupport(const TextureCapsMap &textureCaps)
colorBufferFloat = DetermineColorBufferFloatSupport(textureCaps);
floatBlend = DetermineFloatBlendSupport(textureCaps);
textureNorm16 = DetermineTextureNorm16Support(textureCaps);
textureCompressionRGTC = DetermineRGTCTextureSupport(textureCaps);
textureCompressionBPTC = DetermineBPTCTextureSupport(textureCaps);
compressedTexturePVRTC = DeterminePVRTCTextureSupport(textureCaps);
compressedTexturePVRTCsRGB = DeterminePVRTCsRGBTextureSupport(textureCaps);
@ -863,6 +874,7 @@ const ExtensionInfoMap &GetExtensionInfoMap()
map["GL_KHR_texture_compression_astc_hdr"] = enableableExtension(&Extensions::textureCompressionASTCHDRKHR);
map["GL_OES_texture_compression_astc"] = enableableExtension(&Extensions::textureCompressionASTCOES);
map["GL_EXT_texture_compression_bptc"] = enableableExtension(&Extensions::textureCompressionBPTC);
map["GL_EXT_texture_compression_rgtc"] = enableableExtension(&Extensions::textureCompressionRGTC);
map["GL_OES_compressed_ETC1_RGB8_texture"] = enableableExtension(&Extensions::compressedETC1RGB8TextureOES);
map["GL_OES_compressed_ETC2_RGB8_texture"] = enableableExtension(&Extensions::compressedETC2RGB8TextureOES);
map["GL_OES_compressed_ETC2_sRGB8_texture"] = enableableExtension(&Extensions::compressedETC2sRGB8TextureOES);

Просмотреть файл

@ -118,6 +118,7 @@ struct Extensions
// GL_EXT_color_buffer_float
// GL_EXT_texture_norm16
// GL_EXT_texture_compression_bptc
// GL_EXT_texture_compression_rgtc
void setTextureExtensionSupport(const TextureCapsMap &textureCaps);
// indicate if any depth texture extension is available
@ -215,6 +216,9 @@ struct Extensions
// GL_EXT_texture_compression_bptc
bool textureCompressionBPTC = false;
// GL_EXT_texture_compression_rgtc
bool textureCompressionRGTC = false;
// GL_OES_compressed_ETC1_RGB8_texture
// Implies that TextureCaps for GL_ETC1_RGB8_OES exist
bool compressedETC1RGB8TextureOES = false;

Просмотреть файл

@ -389,6 +389,7 @@
void importSemaphoreFd(SemaphoreID semaphorePacked, HandleType handleTypePacked, GLint fd); \
/* GL_EXT_texture_compression_bptc */ \
/* GL_EXT_texture_compression_dxt1 */ \
/* GL_EXT_texture_compression_rgtc */ \
/* GL_EXT_texture_compression_s3tc */ \
/* GL_EXT_texture_compression_s3tc_srgb */ \
/* GL_EXT_texture_filter_anisotropic */ \

Просмотреть файл

@ -1317,6 +1317,8 @@ angle::CallCapture CaptureImportSemaphoreFdEXT(const State &glState,
// GL_EXT_texture_compression_dxt1
// GL_EXT_texture_compression_rgtc
// GL_EXT_texture_compression_s3tc
// GL_EXT_texture_compression_s3tc_srgb

Просмотреть файл

@ -2,7 +2,7 @@
// Generated by gen_format_map.py using data from format_map_data.json.
// ES3 format info from es3_format_type_combinations.json.
//
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
// Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@ -52,6 +52,26 @@ GLenum GetSizedFormatInternal(GLenum format, GLenum type)
}
break;
case GL_COMPRESSED_RED_GREEN_RGTC2_EXT:
switch (type)
{
case GL_UNSIGNED_BYTE:
return GL_COMPRESSED_RED_GREEN_RGTC2_EXT;
default:
break;
}
break;
case GL_COMPRESSED_RED_RGTC1_EXT:
switch (type)
{
case GL_UNSIGNED_BYTE:
return GL_COMPRESSED_RED_RGTC1_EXT;
default:
break;
}
break;
case GL_COMPRESSED_RGBA_BPTC_UNORM_EXT:
switch (type)
{
@ -162,6 +182,26 @@ GLenum GetSizedFormatInternal(GLenum format, GLenum type)
}
break;
case GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT:
switch (type)
{
case GL_UNSIGNED_BYTE:
return GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT;
default:
break;
}
break;
case GL_COMPRESSED_SIGNED_RED_RGTC1_EXT:
switch (type)
{
case GL_UNSIGNED_BYTE:
return GL_COMPRESSED_SIGNED_RED_RGTC1_EXT;
default:
break;
}
break;
case GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:
switch (type)
{

Просмотреть файл

@ -128,6 +128,18 @@
"GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT": {
"GL_UNSIGNED_BYTE": "GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT"
},
"GL_COMPRESSED_RED_RGTC1_EXT": {
"GL_UNSIGNED_BYTE": "GL_COMPRESSED_RED_RGTC1_EXT"
},
"GL_COMPRESSED_SIGNED_RED_RGTC1_EXT": {
"GL_UNSIGNED_BYTE": "GL_COMPRESSED_SIGNED_RED_RGTC1_EXT"
},
"GL_COMPRESSED_RED_GREEN_RGTC2_EXT": {
"GL_UNSIGNED_BYTE": "GL_COMPRESSED_RED_GREEN_RGTC2_EXT"
},
"GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT": {
"GL_UNSIGNED_BYTE": "GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT"
},
"GL_COMPRESSED_RGBA_BPTC_UNORM_EXT": {
"GL_UNSIGNED_BYTE": "GL_COMPRESSED_RGBA_BPTC_UNORM_EXT"
},

Просмотреть файл

@ -955,6 +955,13 @@ static InternalFormatInfoMap BuildInternalFormatInfoMap()
AddCompressedFormat(&map, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES, 6, 6, 5, 128, 4, true, RequireExt<&Extensions::textureCompressionASTCOES>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported);
AddCompressedFormat(&map, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES, 6, 6, 6, 128, 4, true, RequireExt<&Extensions::textureCompressionASTCOES>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported);
// From EXT_texture_compression_rgtc
// | Internal format | W | H |D | BS |CC| SRGB | Texture supported | Filterable | Texture attachment | Renderbuffer | Blend
AddCompressedFormat(&map, GL_COMPRESSED_RED_RGTC1_EXT, 4, 4, 1, 64, 1, false, RequireExt<&Extensions::textureCompressionRGTC>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported);
AddCompressedFormat(&map, GL_COMPRESSED_SIGNED_RED_RGTC1_EXT, 4, 4, 1, 64, 1, false, RequireExt<&Extensions::textureCompressionRGTC>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported);
AddCompressedFormat(&map, GL_COMPRESSED_RED_GREEN_RGTC2_EXT, 4, 4, 1, 128, 2, false, RequireExt<&Extensions::textureCompressionRGTC>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported);
AddCompressedFormat(&map, GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT, 4, 4, 1, 128, 2, false, RequireExt<&Extensions::textureCompressionRGTC>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported);
// From EXT_texture_compression_bptc
// | Internal format | W | H |D | BS |CC| SRGB | Texture supported | Filterable | Texture attachment | Renderbuffer | Blend
AddCompressedFormat(&map, GL_COMPRESSED_RGBA_BPTC_UNORM_EXT, 4, 4, 1, 128, 4, false, RequireExt<&Extensions::textureCompressionBPTC>, AlwaysSupported, NeverSupported, NeverSupported, NeverSupported);

Просмотреть файл

@ -2529,6 +2529,14 @@ const char *GLenumToString(GLenumGroup enumGroup, unsigned int value)
return "GL_RGBA8I";
case 0x8D8F:
return "GL_RGB8I";
case 0x8DBB:
return "GL_COMPRESSED_RED_RGTC1_EXT";
case 0x8DBC:
return "GL_COMPRESSED_SIGNED_RED_RGTC1_EXT";
case 0x8DBD:
return "GL_COMPRESSED_RED_GREEN_RGTC2_EXT";
case 0x8DBE:
return "GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT";
case 0x8E8C:
return "GL_COMPRESSED_RGBA_BPTC_UNORM_EXT";
case 0x8E8D:

Просмотреть файл

@ -1,7 +1,7 @@
// GENERATED FILE - DO NOT EDIT.
// Generated by gen_angle_format_table.py using data from angle_format_data.json
//
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
// Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@ -92,6 +92,10 @@ enum class FormatID
BC2_RGBA_UNORM_SRGB_BLOCK,
BC3_RGBA_UNORM_BLOCK,
BC3_RGBA_UNORM_SRGB_BLOCK,
BC4_RED_SNORM_BLOCK,
BC4_RED_UNORM_BLOCK,
BC5_RG_SNORM_BLOCK,
BC5_RG_UNORM_BLOCK,
BPTC_RGBA_UNORM_BLOCK,
BPTC_RGB_SIGNED_FLOAT_BLOCK,
BPTC_RGB_UNSIGNED_FLOAT_BLOCK,
@ -237,7 +241,7 @@ enum class FormatID
X2R10G10B10_USCALED_VERTEX
};
constexpr uint32_t kNumANGLEFormats = 218;
constexpr uint32_t kNumANGLEFormats = 222;
} // namespace angle

Просмотреть файл

@ -1,7 +1,7 @@
// GENERATED FILE - DO NOT EDIT.
// Generated by gen_angle_format_table.py using data from angle_format_data.json
//
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
// Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@ -99,6 +99,10 @@ const Format gFormatInfoTable[] = {
{ FormatID::BC2_RGBA_UNORM_SRGB_BLOCK, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 16, std::numeric_limits<GLuint>::max(), true, false, false, gl::VertexAttribType::InvalidEnum },
{ FormatID::BC3_RGBA_UNORM_BLOCK, GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE, GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 16, std::numeric_limits<GLuint>::max(), true, false, false, gl::VertexAttribType::InvalidEnum },
{ FormatID::BC3_RGBA_UNORM_SRGB_BLOCK, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 16, std::numeric_limits<GLuint>::max(), true, false, false, gl::VertexAttribType::InvalidEnum },
{ FormatID::BC4_RED_SNORM_BLOCK, GL_COMPRESSED_SIGNED_RED_RGTC1_EXT, GL_COMPRESSED_SIGNED_RED_RGTC1_EXT, nullptr, NoCopyFunctions, nullptr, nullptr, GL_SIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 8, std::numeric_limits<GLuint>::max(), true, false, false, gl::VertexAttribType::InvalidEnum },
{ FormatID::BC4_RED_UNORM_BLOCK, GL_COMPRESSED_RED_RGTC1_EXT, GL_COMPRESSED_RED_RGTC1_EXT, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 8, std::numeric_limits<GLuint>::max(), true, false, false, gl::VertexAttribType::InvalidEnum },
{ FormatID::BC5_RG_SNORM_BLOCK, GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT, GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT, nullptr, NoCopyFunctions, nullptr, nullptr, GL_SIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 16, std::numeric_limits<GLuint>::max(), true, false, false, gl::VertexAttribType::InvalidEnum },
{ FormatID::BC5_RG_UNORM_BLOCK, GL_COMPRESSED_RED_GREEN_RGTC2_EXT, GL_COMPRESSED_RED_GREEN_RGTC2_EXT, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 16, std::numeric_limits<GLuint>::max(), true, false, false, gl::VertexAttribType::InvalidEnum },
{ FormatID::BPTC_RGBA_UNORM_BLOCK, GL_COMPRESSED_RGBA_BPTC_UNORM_EXT, GL_COMPRESSED_RGBA_BPTC_UNORM_EXT, nullptr, NoCopyFunctions, nullptr, nullptr, GL_UNSIGNED_NORMALIZED, 0, 0, 0, 0, 0, 0, 0, 16, std::numeric_limits<GLuint>::max(), true, false, false, gl::VertexAttribType::InvalidEnum },
{ FormatID::BPTC_RGB_SIGNED_FLOAT_BLOCK, GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT, GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT, nullptr, NoCopyFunctions, nullptr, nullptr, GL_FLOAT, 0, 0, 0, 0, 0, 0, 0, 16, std::numeric_limits<GLuint>::max(), true, false, false, gl::VertexAttribType::Float },
{ FormatID::BPTC_RGB_UNSIGNED_FLOAT_BLOCK, GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT, GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT, nullptr, NoCopyFunctions, nullptr, nullptr, GL_FLOAT, 0, 0, 0, 0, 0, 0, 0, 16, std::numeric_limits<GLuint>::max(), true, false, false, gl::VertexAttribType::Float },
@ -284,6 +288,10 @@ FormatID Format::InternalFormatToID(GLenum internalFormat)
return FormatID::B8G8R8X8_UNORM;
case GL_COMPRESSED_R11_EAC:
return FormatID::EAC_R11_UNORM_BLOCK;
case GL_COMPRESSED_RED_GREEN_RGTC2_EXT:
return FormatID::BC5_RG_UNORM_BLOCK;
case GL_COMPRESSED_RED_RGTC1_EXT:
return FormatID::BC4_RED_UNORM_BLOCK;
case GL_COMPRESSED_RG11_EAC:
return FormatID::EAC_R11G11_UNORM_BLOCK;
case GL_COMPRESSED_RGB8_ETC2:
@ -364,6 +372,10 @@ FormatID Format::InternalFormatToID(GLenum internalFormat)
return FormatID::BC1_RGB_UNORM_BLOCK;
case GL_COMPRESSED_SIGNED_R11_EAC:
return FormatID::EAC_R11_SNORM_BLOCK;
case GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT:
return FormatID::BC5_RG_SNORM_BLOCK;
case GL_COMPRESSED_SIGNED_RED_RGTC1_EXT:
return FormatID::BC4_RED_SNORM_BLOCK;
case GL_COMPRESSED_SIGNED_RG11_EAC:
return FormatID::EAC_R11G11_SNORM_BLOCK;
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:

Просмотреть файл

@ -201,6 +201,18 @@
"BC3_RGBA_UNORM_SRGB_BLOCK": {
"blockPixelBytes": "16"
},
"BC4_RED_UNORM_BLOCK": {
"blockPixelBytes": "8"
},
"BC4_RED_SNORM_BLOCK": {
"blockPixelBytes": "8"
},
"BC5_RG_UNORM_BLOCK": {
"blockPixelBytes": "16"
},
"BC5_RG_SNORM_BLOCK": {
"blockPixelBytes": "16"
},
"BPTC_SRGB_ALPHA_UNORM_BLOCK": {
"blockPixelBytes": "16"
},

Просмотреть файл

@ -74,6 +74,10 @@
[ "GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT", "BC2_RGBA_UNORM_SRGB_BLOCK" ],
[ "GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT", "BC3_RGBA_UNORM_SRGB_BLOCK" ],
[ "GL_COMPRESSED_SRGB_S3TC_DXT1_EXT", "BC1_RGB_UNORM_SRGB_BLOCK" ],
[ "GL_COMPRESSED_RED_RGTC1_EXT", "BC4_RED_UNORM_BLOCK" ],
[ "GL_COMPRESSED_SIGNED_RED_RGTC1_EXT", "BC4_RED_SNORM_BLOCK" ],
[ "GL_COMPRESSED_RED_GREEN_RGTC2_EXT", "BC5_RG_UNORM_BLOCK" ],
[ "GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT", "BC5_RG_SNORM_BLOCK" ],
[ "GL_COMPRESSED_RGBA_BPTC_UNORM_EXT", "BPTC_RGBA_UNORM_BLOCK" ],
[ "GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT", "BPTC_SRGB_ALPHA_UNORM_BLOCK" ],
[ "GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT", "BPTC_RGB_SIGNED_FLOAT_BLOCK" ],

Просмотреть файл

@ -79,11 +79,11 @@
"BC3_UNORM": "BC3_RGBA_UNORM_BLOCK",
"BC3_UNORM_SRGB": "BC3_RGBA_UNORM_SRGB_BLOCK",
"BC4_TYPELESS": "",
"BC4_UNORM": "",
"BC4_SNORM": "",
"BC4_UNORM": "BC4_RED_UNORM_BLOCK",
"BC4_SNORM": "BC4_RED_SNORM_BLOCK",
"BC5_TYPELESS": "",
"BC5_UNORM": "",
"BC5_SNORM": "",
"BC5_UNORM": "BC5_RG_UNORM_BLOCK",
"BC5_SNORM": "BC5_RG_SNORM_BLOCK",
"B5G6R5_UNORM": "",
"B5G5R5A1_UNORM": "",
"B8G8R8A8_UNORM": "",

Просмотреть файл

@ -1,7 +1,7 @@
// GENERATED FILE - DO NOT EDIT.
// Generated by gen_dxgi_format_table.py using data from dxgi_format_data.json.
//
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
// Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@ -318,17 +318,17 @@ const Format &GetFormat(DXGI_FORMAT dxgiFormat)
case DXGI_FORMAT_BC3_UNORM_SRGB:
return Format::Get(FormatID::BC3_RGBA_UNORM_SRGB_BLOCK);
case DXGI_FORMAT_BC4_SNORM:
break;
return Format::Get(FormatID::BC4_RED_SNORM_BLOCK);
case DXGI_FORMAT_BC4_TYPELESS:
break;
case DXGI_FORMAT_BC4_UNORM:
break;
return Format::Get(FormatID::BC4_RED_UNORM_BLOCK);
case DXGI_FORMAT_BC5_SNORM:
break;
return Format::Get(FormatID::BC5_RG_SNORM_BLOCK);
case DXGI_FORMAT_BC5_TYPELESS:
break;
case DXGI_FORMAT_BC5_UNORM:
break;
return Format::Get(FormatID::BC5_RG_UNORM_BLOCK);
case DXGI_FORMAT_BC6H_SF16:
break;
case DXGI_FORMAT_BC6H_TYPELESS:

Просмотреть файл

@ -870,9 +870,9 @@
},
"DXGI_FORMAT_BC4_TYPELESS":
{
"texture2D": "always",
"texture3D": "always",
"textureCube": "always",
"texture2D": "10_0",
"texture3D": "10_0",
"textureCube": "10_0",
"shaderSample": "never",
"renderTarget": "never",
"multisampleRT": "never",
@ -881,9 +881,9 @@
},
"DXGI_FORMAT_BC4_UNORM":
{
"texture2D": "always",
"texture3D": "always",
"textureCube": "always",
"texture2D": "10_0",
"texture3D": "10_0",
"textureCube": "10_0",
"shaderSample": "10_0",
"renderTarget": "never",
"multisampleRT": "never",
@ -892,9 +892,9 @@
},
"DXGI_FORMAT_BC4_SNORM":
{
"texture2D": "always",
"texture3D": "always",
"textureCube": "always",
"texture2D": "10_0",
"texture3D": "10_0",
"textureCube": "10_0",
"shaderSample": "10_0",
"renderTarget": "never",
"multisampleRT": "never",
@ -903,9 +903,9 @@
},
"DXGI_FORMAT_BC5_TYPELESS":
{
"texture2D": "always",
"texture3D": "always",
"textureCube": "always",
"texture2D": "10_0",
"texture3D": "10_0",
"textureCube": "10_0",
"shaderSample": "never",
"renderTarget": "never",
"multisampleRT": "never",
@ -914,9 +914,9 @@
},
"DXGI_FORMAT_BC5_UNORM":
{
"texture2D": "always",
"texture3D": "always",
"textureCube": "always",
"texture2D": "10_0",
"texture3D": "10_0",
"textureCube": "10_0",
"shaderSample": "10_0",
"renderTarget": "never",
"multisampleRT": "never",
@ -925,9 +925,9 @@
},
"DXGI_FORMAT_BC5_SNORM":
{
"texture2D": "always",
"texture3D": "always",
"textureCube": "always",
"texture2D": "10_0",
"texture3D": "10_0",
"textureCube": "10_0",
"shaderSample": "10_0",
"renderTarget": "never",
"multisampleRT": "never",

Просмотреть файл

@ -164,32 +164,32 @@ const DXGISupport &GetDXGISupport_9_3(DXGI_FORMAT dxgiFormat)
}
case DXGI_FORMAT_BC4_SNORM:
{
static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT, 0);
static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT, 0);
return info;
}
case DXGI_FORMAT_BC4_TYPELESS:
{
static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0);
static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0);
return info;
}
case DXGI_FORMAT_BC4_UNORM:
{
static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT, 0);
static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT, 0);
return info;
}
case DXGI_FORMAT_BC5_SNORM:
{
static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT, 0);
static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT, 0);
return info;
}
case DXGI_FORMAT_BC5_TYPELESS:
{
static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0);
static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT | F_SAMPLE, 0);
return info;
}
case DXGI_FORMAT_BC5_UNORM:
{
static const DXGISupport info(F_2D | F_3D | F_CUBE, F_DS | F_MIPGEN | F_MS | F_RT, 0);
static const DXGISupport info(0, F_DS | F_MIPGEN | F_MS | F_RT, 0);
return info;
}
case DXGI_FORMAT_BC6H_SF16:

Просмотреть файл

@ -171,6 +171,34 @@
"componentType": "unorm",
"swizzleFormat": "GL_RGBA8"
},
"BC4_RED_UNORM_BLOCK": {
"texFormat": "DXGI_FORMAT_BC4_UNORM",
"srvFormat": "DXGI_FORMAT_BC4_UNORM",
"channels": "r",
"componentType": "unorm",
"swizzleFormat": "GL_RGBA8"
},
"BC4_RED_SNORM_BLOCK": {
"texFormat": "DXGI_FORMAT_BC4_SNORM",
"srvFormat": "DXGI_FORMAT_BC4_SNORM",
"channels": "r",
"componentType": "snorm",
"swizzleFormat": "GL_RGBA8_SNORM"
},
"BC5_RG_UNORM_BLOCK": {
"texFormat": "DXGI_FORMAT_BC5_UNORM",
"srvFormat": "DXGI_FORMAT_BC5_UNORM",
"channels": "rg",
"componentType": "unorm",
"swizzleFormat": "GL_RGBA8"
},
"BC5_RG_SNORM_BLOCK": {
"texFormat": "DXGI_FORMAT_BC5_SNORM",
"srvFormat": "DXGI_FORMAT_BC5_SNORM",
"channels": "rg",
"componentType": "snorm",
"swizzleFormat": "GL_RGBA8_SNORM"
},
"BPTC_RGBA_UNORM_BLOCK": {
"texFormat": "DXGI_FORMAT_BC7_UNORM",
"srvFormat": "DXGI_FORMAT_BC7_UNORM",

Просмотреть файл

@ -1,7 +1,7 @@
// GENERATED FILE - DO NOT EDIT.
// Generated by gen_texture_format_table.py using data from texture_format_data.json
//
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
// Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@ -224,6 +224,34 @@ const Format &Format::Get(GLenum internalFormat, const Renderer11DeviceCaps &dev
nullptr);
return info;
}
case GL_COMPRESSED_RED_GREEN_RGTC2_EXT:
{
static constexpr Format info(GL_COMPRESSED_RED_GREEN_RGTC2_EXT,
angle::FormatID::BC5_RG_UNORM_BLOCK,
DXGI_FORMAT_BC5_UNORM,
DXGI_FORMAT_BC5_UNORM,
DXGI_FORMAT_UNKNOWN,
DXGI_FORMAT_UNKNOWN,
DXGI_FORMAT_UNKNOWN,
DXGI_FORMAT_BC5_UNORM,
GL_RGBA8,
nullptr);
return info;
}
case GL_COMPRESSED_RED_RGTC1_EXT:
{
static constexpr Format info(GL_COMPRESSED_RED_RGTC1_EXT,
angle::FormatID::BC4_RED_UNORM_BLOCK,
DXGI_FORMAT_BC4_UNORM,
DXGI_FORMAT_BC4_UNORM,
DXGI_FORMAT_UNKNOWN,
DXGI_FORMAT_UNKNOWN,
DXGI_FORMAT_UNKNOWN,
DXGI_FORMAT_BC4_UNORM,
GL_RGBA8,
nullptr);
return info;
}
case GL_COMPRESSED_RG11_EAC:
{
static constexpr Format info(GL_COMPRESSED_RG11_EAC,
@ -812,6 +840,34 @@ const Format &Format::Get(GLenum internalFormat, const Renderer11DeviceCaps &dev
nullptr);
return info;
}
case GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT:
{
static constexpr Format info(GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT,
angle::FormatID::BC5_RG_SNORM_BLOCK,
DXGI_FORMAT_BC5_SNORM,
DXGI_FORMAT_BC5_SNORM,
DXGI_FORMAT_UNKNOWN,
DXGI_FORMAT_UNKNOWN,
DXGI_FORMAT_UNKNOWN,
DXGI_FORMAT_BC5_SNORM,
GL_RGBA8_SNORM,
nullptr);
return info;
}
case GL_COMPRESSED_SIGNED_RED_RGTC1_EXT:
{
static constexpr Format info(GL_COMPRESSED_SIGNED_RED_RGTC1_EXT,
angle::FormatID::BC4_RED_SNORM_BLOCK,
DXGI_FORMAT_BC4_SNORM,
DXGI_FORMAT_BC4_SNORM,
DXGI_FORMAT_UNKNOWN,
DXGI_FORMAT_UNKNOWN,
DXGI_FORMAT_UNKNOWN,
DXGI_FORMAT_BC4_SNORM,
GL_RGBA8_SNORM,
nullptr);
return info;
}
case GL_COMPRESSED_SIGNED_RG11_EAC:
{
static constexpr Format info(GL_COMPRESSED_SIGNED_RG11_EAC,

Просмотреть файл

@ -1,7 +1,7 @@
// GENERATED FILE - DO NOT EDIT.
// Generated by generate_gl_dispatch_table.py using data from gl_bindings_data.json and gl.xml.
//
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
// Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//

Просмотреть файл

@ -1,7 +1,7 @@
// GENERATED FILE - DO NOT EDIT.
// Generated by generate_gl_dispatch_table.py using data from gl_bindings_data.json and gl.xml.
//
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
// Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//

Просмотреть файл

@ -286,6 +286,13 @@ static InternalFormatInfoMap BuildInternalFormatInfoMap()
InsertFormatMapping(&map, GL_LUMINANCE32F_EXT, VersionOrExts(3, 0, "GL_ARB_texture_float"), AlwaysSupported(), NeverSupported(), ExtsOnly("GL_OES_texture_float"), ExtsOnly("GL_OES_texture_float_linear"), NeverSupported(), NeverSupported() );
InsertFormatMapping(&map, GL_LUMINANCE_ALPHA32F_EXT, VersionOrExts(3, 0, "GL_ARB_texture_float"), AlwaysSupported(), NeverSupported(), ExtsOnly("GL_OES_texture_float"), ExtsOnly("GL_OES_texture_float_linear"), NeverSupported(), NeverSupported() );
// EXT_texture_compression_rgtc formats
// | Format | OpenGL texture support | Filter | Render | OpenGL ES texture support | Filter | OpenGL ES texture attachment support | OpenGL ES renderbuffer support |
InsertFormatMapping(&map, GL_COMPRESSED_RED_RGTC1_EXT, VersionOrExts(3, 0, "GL_ARB_texture_compression_rgtc"), AlwaysSupported(), NeverSupported(), ExtsOnly("GL_EXT_texture_compression_rgtc"), AlwaysSupported(), NeverSupported(), NeverSupported() );
InsertFormatMapping(&map, GL_COMPRESSED_SIGNED_RED_RGTC1_EXT, VersionOrExts(3, 0, "GL_ARB_texture_compression_rgtc"), AlwaysSupported(), NeverSupported(), ExtsOnly("GL_EXT_texture_compression_rgtc"), AlwaysSupported(), NeverSupported(), NeverSupported() );
InsertFormatMapping(&map, GL_COMPRESSED_RED_GREEN_RGTC2_EXT, VersionOrExts(3, 0, "GL_ARB_texture_compression_rgtc"), AlwaysSupported(), NeverSupported(), ExtsOnly("GL_EXT_texture_compression_rgtc"), AlwaysSupported(), NeverSupported(), NeverSupported() );
InsertFormatMapping(&map, GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT, VersionOrExts(3, 0, "GL_ARB_texture_compression_rgtc"), AlwaysSupported(), NeverSupported(), ExtsOnly("GL_EXT_texture_compression_rgtc"), AlwaysSupported(), NeverSupported(), NeverSupported() );
// EXT_texture_compression_bptc formats
// | Format | OpenGL texture support | Filter | Render | OpenGL ES texture support | Filter | OpenGL ES texture attachment support | OpenGL ES renderbuffer support |
InsertFormatMapping(&map, GL_COMPRESSED_RGBA_BPTC_UNORM_EXT, VersionOrExts(4, 2, "GL_ARB_texture_compression_bptc"), AlwaysSupported(), NeverSupported(), ExtsOnly("GL_EXT_texture_compression_bptc"), AlwaysSupported(), NeverSupported(), NeverSupported() );

Просмотреть файл

@ -1,7 +1,7 @@
// GENERATED FILE - DO NOT EDIT.
// Generated by generate_gl_dispatch_table.py using data from gl_bindings_data.json and gl.xml.
//
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
// Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//

Просмотреть файл

@ -1,7 +1,7 @@
// GENERATED FILE - DO NOT EDIT.
// Generated by generate_gl_dispatch_table.py using data from gl_bindings_data.json and gl.xml.
//
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
// Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//

Просмотреть файл

@ -875,6 +875,26 @@
"GL_UNSIGNED_BYTE": "LoadCompressedToNative<4, 4, 1, 16>"
}
},
"GL_COMPRESSED_RED_RGTC1_EXT": {
"NONE": {
"GL_UNSIGNED_BYTE": "LoadCompressedToNative<4, 4, 1, 8>"
}
},
"GL_COMPRESSED_SIGNED_RED_RGTC1_EXT": {
"NONE": {
"GL_UNSIGNED_BYTE": "LoadCompressedToNative<4, 4, 1, 8>"
}
},
"GL_COMPRESSED_RED_GREEN_RGTC2_EXT": {
"NONE": {
"GL_UNSIGNED_BYTE": "LoadCompressedToNative<4, 4, 1, 16>"
}
},
"GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT": {
"NONE": {
"GL_UNSIGNED_BYTE": "LoadCompressedToNative<4, 4, 1, 16>"
}
},
"GL_COMPRESSED_RGBA_BPTC_UNORM_EXT": {
"NONE": {
"GL_UNSIGNED_BYTE": "LoadCompressedToNative<4, 4, 1, 16>"

Просмотреть файл

@ -338,6 +338,30 @@ LoadImageFunctionInfo COMPRESSED_R11_EAC_to_R16_UNORM(GLenum type)
}
}
LoadImageFunctionInfo COMPRESSED_RED_GREEN_RGTC2_EXT_to_default(GLenum type)
{
switch (type)
{
case GL_UNSIGNED_BYTE:
return LoadImageFunctionInfo(LoadCompressedToNative<4, 4, 1, 16>, true);
default:
UNREACHABLE();
return LoadImageFunctionInfo(UnreachableLoadFunction, true);
}
}
LoadImageFunctionInfo COMPRESSED_RED_RGTC1_EXT_to_default(GLenum type)
{
switch (type)
{
case GL_UNSIGNED_BYTE:
return LoadImageFunctionInfo(LoadCompressedToNative<4, 4, 1, 8>, true);
default:
UNREACHABLE();
return LoadImageFunctionInfo(UnreachableLoadFunction, true);
}
}
LoadImageFunctionInfo COMPRESSED_RG11_EAC_to_EAC_R11G11_UNORM_BLOCK(GLenum type)
{
switch (type)
@ -880,6 +904,30 @@ LoadImageFunctionInfo COMPRESSED_SIGNED_R11_EAC_to_R16_SNORM(GLenum type)
}
}
LoadImageFunctionInfo COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT_to_default(GLenum type)
{
switch (type)
{
case GL_UNSIGNED_BYTE:
return LoadImageFunctionInfo(LoadCompressedToNative<4, 4, 1, 16>, true);
default:
UNREACHABLE();
return LoadImageFunctionInfo(UnreachableLoadFunction, true);
}
}
LoadImageFunctionInfo COMPRESSED_SIGNED_RED_RGTC1_EXT_to_default(GLenum type)
{
switch (type)
{
case GL_UNSIGNED_BYTE:
return LoadImageFunctionInfo(LoadCompressedToNative<4, 4, 1, 8>, true);
default:
UNREACHABLE();
return LoadImageFunctionInfo(UnreachableLoadFunction, true);
}
}
LoadImageFunctionInfo COMPRESSED_SIGNED_RG11_EAC_to_EAC_R11G11_SNORM_BLOCK(GLenum type)
{
switch (type)
@ -3177,6 +3225,10 @@ LoadFunctionMap GetLoadFunctionsMap(GLenum internalFormat, FormatID angleFormat)
}
break;
}
case GL_COMPRESSED_RED_GREEN_RGTC2_EXT:
return COMPRESSED_RED_GREEN_RGTC2_EXT_to_default;
case GL_COMPRESSED_RED_RGTC1_EXT:
return COMPRESSED_RED_RGTC1_EXT_to_default;
case GL_COMPRESSED_RG11_EAC:
{
switch (angleFormat)
@ -3330,6 +3382,10 @@ LoadFunctionMap GetLoadFunctionsMap(GLenum internalFormat, FormatID angleFormat)
}
break;
}
case GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT:
return COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT_to_default;
case GL_COMPRESSED_SIGNED_RED_RGTC1_EXT:
return COMPRESSED_SIGNED_RED_RGTC1_EXT_to_default;
case GL_COMPRESSED_SIGNED_RG11_EAC:
{
switch (angleFormat)

Просмотреть файл

@ -54,7 +54,11 @@
"BC2_RGBA_UNORM_BLOCK": "MTLPixelFormatBC2_RGBA",
"BC2_RGBA_UNORM_SRGB_BLOCK": "MTLPixelFormatBC2_RGBA_sRGB",
"BC3_RGBA_UNORM_BLOCK": "MTLPixelFormatBC3_RGBA",
"BC3_RGBA_UNORM_SRGB_BLOCK": "MTLPixelFormatBC3_RGBA_sRGB"
"BC3_RGBA_UNORM_SRGB_BLOCK": "MTLPixelFormatBC3_RGBA_sRGB",
"BC4_RED_UNORM_BLOCK": "MTLPixelFormatBC4_RUnorm",
"BC4_RED_SNORM_BLOCK": "MTLPixelFormatBC4_RSnorm",
"BC5_RG_UNORM_BLOCK": "MTLPixelFormatBC5_RGUnorm",
"BC5_RG_SNORM_BLOCK": "MTLPixelFormatBC5_RGSnorm"
},
"override": {
"L8_UNORM": "R8G8B8A8_UNORM",

Просмотреть файл

@ -1,7 +1,7 @@
// GENERATED FILE - DO NOT EDIT.
// Generated by gen_mtl_format_table.py using data from mtl_format_map.json
//
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
// Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@ -454,6 +454,26 @@ void Format::init(const DisplayMtl *display, angle::FormatID intendedFormatId_)
this->actualFormatId = angle::FormatID::BC3_RGBA_UNORM_SRGB_BLOCK;
break;
case angle::FormatID::BC4_RED_SNORM_BLOCK:
this->metalFormat = MTLPixelFormatBC4_RSnorm;
this->actualFormatId = angle::FormatID::BC4_RED_SNORM_BLOCK;
break;
case angle::FormatID::BC4_RED_UNORM_BLOCK:
this->metalFormat = MTLPixelFormatBC4_RUnorm;
this->actualFormatId = angle::FormatID::BC4_RED_UNORM_BLOCK;
break;
case angle::FormatID::BC5_RG_SNORM_BLOCK:
this->metalFormat = MTLPixelFormatBC5_RGSnorm;
this->actualFormatId = angle::FormatID::BC5_RG_SNORM_BLOCK;
break;
case angle::FormatID::BC5_RG_UNORM_BLOCK:
this->metalFormat = MTLPixelFormatBC5_RGUnorm;
this->actualFormatId = angle::FormatID::BC5_RG_UNORM_BLOCK;
break;
case angle::FormatID::D16_UNORM:
this->metalFormat = MTLPixelFormatDepth16Unorm;
this->actualFormatId = angle::FormatID::D16_UNORM;

Просмотреть файл

@ -117,6 +117,10 @@
"BC2_RGBA_UNORM_SRGB_BLOCK": "VK_FORMAT_BC2_SRGB_BLOCK",
"BC3_RGBA_UNORM_BLOCK": "VK_FORMAT_BC3_UNORM_BLOCK",
"BC3_RGBA_UNORM_SRGB_BLOCK": "VK_FORMAT_BC3_SRGB_BLOCK",
"BC4_RED_UNORM_BLOCK": "VK_FORMAT_BC4_UNORM_BLOCK",
"BC4_RED_SNORM_BLOCK": "VK_FORMAT_BC4_SNORM_BLOCK",
"BC5_RG_UNORM_BLOCK": "VK_FORMAT_BC5_UNORM_BLOCK",
"BC5_RG_SNORM_BLOCK": "VK_FORMAT_BC5_SNORM_BLOCK",
"BPTC_RGB_UNSIGNED_FLOAT_BLOCK": "VK_FORMAT_BC6H_UFLOAT_BLOCK",
"BPTC_RGB_SIGNED_FLOAT_BLOCK": "VK_FORMAT_BC6H_SFLOAT_BLOCK",
"BPTC_RGBA_UNORM_BLOCK": "VK_FORMAT_BC7_UNORM_BLOCK",

Просмотреть файл

@ -726,6 +726,54 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
vertexLoadRequiresConversion = false;
break;
case angle::FormatID::BC4_RED_SNORM_BLOCK:
internalFormat = GL_COMPRESSED_SIGNED_RED_RGTC1_EXT;
actualImageFormatID = angle::FormatID::BC4_RED_SNORM_BLOCK;
vkImageFormat = VK_FORMAT_BC4_SNORM_BLOCK;
imageInitializerFunction = nullptr;
actualBufferFormatID = angle::FormatID::BC4_RED_SNORM_BLOCK;
vkBufferFormat = VK_FORMAT_BC4_SNORM_BLOCK;
vkBufferFormatIsPacked = false;
vertexLoadFunction = nullptr;
vertexLoadRequiresConversion = false;
break;
case angle::FormatID::BC4_RED_UNORM_BLOCK:
internalFormat = GL_COMPRESSED_RED_RGTC1_EXT;
actualImageFormatID = angle::FormatID::BC4_RED_UNORM_BLOCK;
vkImageFormat = VK_FORMAT_BC4_UNORM_BLOCK;
imageInitializerFunction = nullptr;
actualBufferFormatID = angle::FormatID::BC4_RED_UNORM_BLOCK;
vkBufferFormat = VK_FORMAT_BC4_UNORM_BLOCK;
vkBufferFormatIsPacked = false;
vertexLoadFunction = nullptr;
vertexLoadRequiresConversion = false;
break;
case angle::FormatID::BC5_RG_SNORM_BLOCK:
internalFormat = GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT;
actualImageFormatID = angle::FormatID::BC5_RG_SNORM_BLOCK;
vkImageFormat = VK_FORMAT_BC5_SNORM_BLOCK;
imageInitializerFunction = nullptr;
actualBufferFormatID = angle::FormatID::BC5_RG_SNORM_BLOCK;
vkBufferFormat = VK_FORMAT_BC5_SNORM_BLOCK;
vkBufferFormatIsPacked = false;
vertexLoadFunction = nullptr;
vertexLoadRequiresConversion = false;
break;
case angle::FormatID::BC5_RG_UNORM_BLOCK:
internalFormat = GL_COMPRESSED_RED_GREEN_RGTC2_EXT;
actualImageFormatID = angle::FormatID::BC5_RG_UNORM_BLOCK;
vkImageFormat = VK_FORMAT_BC5_UNORM_BLOCK;
imageInitializerFunction = nullptr;
actualBufferFormatID = angle::FormatID::BC5_RG_UNORM_BLOCK;
vkBufferFormat = VK_FORMAT_BC5_UNORM_BLOCK;
vkBufferFormatIsPacked = false;
vertexLoadFunction = nullptr;
vertexLoadRequiresConversion = false;
break;
case angle::FormatID::BPTC_RGBA_UNORM_BLOCK:
internalFormat = GL_COMPRESSED_RGBA_BPTC_UNORM_EXT;
actualImageFormatID = angle::FormatID::BPTC_RGBA_UNORM_BLOCK;

Просмотреть файл

@ -57,6 +57,10 @@ bool CompressedTextureFormatRequiresExactSize(GLenum internalFormat)
case GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_LOSSY_DECODE_ETC2_ANGLE:
case GL_COMPRESSED_RGBA8_LOSSY_DECODE_ETC2_EAC_ANGLE:
case GL_COMPRESSED_SRGB8_ALPHA8_LOSSY_DECODE_ETC2_EAC_ANGLE:
case GL_COMPRESSED_RED_RGTC1_EXT:
case GL_COMPRESSED_SIGNED_RED_RGTC1_EXT:
case GL_COMPRESSED_RED_GREEN_RGTC2_EXT:
case GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT:
case GL_COMPRESSED_RGBA_BPTC_UNORM_EXT:
case GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:
case GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT:

Просмотреть файл

@ -1057,6 +1057,8 @@ bool ValidateImportSemaphoreFdEXT(Context *context,
// GL_EXT_texture_compression_dxt1
// GL_EXT_texture_compression_rgtc
// GL_EXT_texture_compression_s3tc
// GL_EXT_texture_compression_s3tc_srgb

Просмотреть файл

@ -5229,6 +5229,8 @@ void GL_APIENTRY ImportSemaphoreFdEXT(GLuint semaphore, GLenum handleType, GLint
// GL_EXT_texture_compression_dxt1
// GL_EXT_texture_compression_rgtc
// GL_EXT_texture_compression_s3tc
// GL_EXT_texture_compression_s3tc_srgb

Просмотреть файл

@ -897,6 +897,8 @@ ANGLE_EXPORT void GL_APIENTRY ImportSemaphoreFdEXT(GLuint semaphore, GLenum hand
// GL_EXT_texture_compression_dxt1
// GL_EXT_texture_compression_rgtc
// GL_EXT_texture_compression_s3tc
// GL_EXT_texture_compression_s3tc_srgb

Просмотреть файл

@ -4304,6 +4304,8 @@ void GL_APIENTRY glImportSemaphoreFdEXT(GLuint semaphore, GLenum handleType, GLi
// GL_EXT_texture_compression_dxt1
// GL_EXT_texture_compression_rgtc
// GL_EXT_texture_compression_s3tc
// GL_EXT_texture_compression_s3tc_srgb

Просмотреть файл

@ -720,6 +720,8 @@ EXPORTS
; GL_EXT_texture_compression_dxt1
; GL_EXT_texture_compression_rgtc
; GL_EXT_texture_compression_s3tc
; GL_EXT_texture_compression_s3tc_srgb

Просмотреть файл

@ -720,6 +720,8 @@ EXPORTS
; GL_EXT_texture_compression_dxt1
; GL_EXT_texture_compression_rgtc
; GL_EXT_texture_compression_s3tc
; GL_EXT_texture_compression_s3tc_srgb

Просмотреть файл

@ -720,6 +720,8 @@ EXPORTS
; GL_EXT_texture_compression_dxt1
; GL_EXT_texture_compression_rgtc
; GL_EXT_texture_compression_s3tc
; GL_EXT_texture_compression_s3tc_srgb