[ios]: fix missing caps for D16_UNORM

Fixes "Assert failed in updateCaps (third_party/angle/src/libANGLE/ \
Context.cpp:4368): getClientVersion() < ES_3_0 || \
formatMaxSamples >= 4" as D16_UNORM caps were missing, which resulted
in GenerateTextureCapsMap skipping that format.

Bug: angleproject:6597, chromium:1413715
Change-Id: I031271e2db07d129e0c383107db2080794a11da1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4236537
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
This commit is contained in:
Maksim Sisov 2023-02-09 11:51:24 +02:00 коммит произвёл Angle LUCI CQ
Родитель 91d55479a1
Коммит 25e9686cf6
3 изменённых файлов: 16 добавлений и 2 удалений

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

@ -6,7 +6,7 @@
"src/libANGLE/renderer/metal/gen_mtl_format_table.py":
"28f3065f5d1bc65803b1218b706430ae",
"src/libANGLE/renderer/metal/mtl_format_map.json":
"635fa5d81e340bf0d6c7cbbdd804b110",
"1bfe5f014cd73c83c279b5a2c78370a4",
"src/libANGLE/renderer/metal/mtl_format_table_autogen.mm":
"c1dc9a979d33e5d55285504a7cef5e7f"
"9935924d4bb57d08e1328e26deaa2514"
}

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

@ -707,6 +707,15 @@
}
},
"caps_ios_platform": {
"MTLPixelFormatDepth16Unorm":{
"filterable": "true",
"writable": "false",
"blendable": "false",
"multisample": "true",
"resolve": "supportDepthAutoResolve",
"colorRenderable": "false",
"depthRenderable": "true"
},
"MTLPixelFormatR8Unorm_sRGB":{
"filterable": "display->supportsAppleGPUFamily(1)",
"writable": "display->supportsAppleGPUFamily(2)",

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

@ -4006,6 +4006,11 @@ void FormatTable::initNativeFormatCapsAutogen(const DisplayMtl *display)
/** colorRenderable*/ display->supportsAppleGPUFamily(1),
/** depthRenderable*/ false);
setFormatCaps(MTLPixelFormatDepth16Unorm, /** filterable*/ true, /** writable*/ false,
/** blendable*/ false, /** multisample*/ true,
/** resolve*/ supportDepthAutoResolve, /** colorRenderable*/ false,
/** depthRenderable*/ true);
setFormatCaps(MTLPixelFormatEAC_R11Snorm, /** filterable*/ display->supportsAppleGPUFamily(1),
/** writable*/ false, /** blendable*/ false, /** multisample*/ false,
/** resolve*/ false, /** colorRenderable*/ false, /** depthRenderable*/ false);