Tweak JavaScript formatting of compressed formats Fixes the library_webgpu_enum_tables.js generation for the BC formats. ETC2 and ASTC are not in the spec yet, so I took a guess at how those would be formatted. Bug: dawn:501 Change-Id: Icee5f1db039c1b401082676dab3020dda21da8bb Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64525 Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Loko Kung <lokokung@google.com> Reviewed-by: Austin Eng <enga@chromium.org>
diff --git a/dawn.json b/dawn.json index 45db3e2..0cae33e 100644 --- a/dawn.json +++ b/dawn.json
@@ -2183,60 +2183,60 @@ {"value": 40, "name": "depth24 plus stencil8"}, {"value": 41, "name": "depth32 float"}, - {"value": 42, "name": "BC1 RGBA unorm"}, - {"value": 43, "name": "BC1 RGBA unorm srgb"}, - {"value": 44, "name": "BC2 RGBA unorm"}, - {"value": 45, "name": "BC2 RGBA unorm srgb"}, - {"value": 46, "name": "BC3 RGBA unorm"}, - {"value": 47, "name": "BC3 RGBA unorm srgb"}, - {"value": 48, "name": "BC4 R unorm"}, - {"value": 49, "name": "BC4 R snorm"}, - {"value": 50, "name": "BC5 RG unorm"}, - {"value": 51, "name": "BC5 RG snorm"}, - {"value": 52, "name": "BC6H RGB ufloat"}, - {"value": 53, "name": "BC6H RGB float"}, - {"value": 54, "name": "BC7 RGBA unorm"}, - {"value": 55, "name": "BC7 RGBA unorm srgb"}, + {"value": 42, "name": "BC1 RGBA unorm", "jsrepr": "'bc1-rgba-unorm'"}, + {"value": 43, "name": "BC1 RGBA unorm srgb", "jsrepr": "'bc1-rgba-unorm-srgb'"}, + {"value": 44, "name": "BC2 RGBA unorm", "jsrepr": "'bc2-rgba-unorm'"}, + {"value": 45, "name": "BC2 RGBA unorm srgb", "jsrepr": "'bc2-rgba-unorm-srgb'"}, + {"value": 46, "name": "BC3 RGBA unorm", "jsrepr": "'bc3-rgba-unorm'"}, + {"value": 47, "name": "BC3 RGBA unorm srgb", "jsrepr": "'bc3-rgba-unorm-srgb'"}, + {"value": 48, "name": "BC4 R unorm", "jsrepr": "'bc4-r-unorm'"}, + {"value": 49, "name": "BC4 R snorm", "jsrepr": "'bc4-r-snorm'"}, + {"value": 50, "name": "BC5 RG unorm", "jsrepr": "'bc5-rg-unorm'"}, + {"value": 51, "name": "BC5 RG snorm", "jsrepr": "'bc5-rg-snorm'"}, + {"value": 52, "name": "BC6H RGB ufloat", "jsrepr": "'bc6h-rgb-ufloat'"}, + {"value": 53, "name": "BC6H RGB float", "jsrepr": "'bc6h-rgb-float'"}, + {"value": 54, "name": "BC7 RGBA unorm", "jsrepr": "'bc7-rgba-unorm'"}, + {"value": 55, "name": "BC7 RGBA unorm srgb", "jsrepr": "'bc7-rgba-unorm-srgb'"}, - {"value": 56, "name": "ETC2 RGB8 unorm"}, - {"value": 57, "name": "ETC2 RGB8 unorm srgb"}, - {"value": 58, "name": "ETC2 RGB8A1 unorm"}, - {"value": 59, "name": "ETC2 RGB8A1 unorm srgb"}, - {"value": 60, "name": "ETC2 RGBA8 unorm"}, - {"value": 61, "name": "ETC2 RGBA8 unorm srgb"}, - {"value": 62, "name": "EAC R11 unorm"}, - {"value": 63, "name": "EAC R11 snorm"}, - {"value": 64, "name": "EAC RG11 unorm"}, - {"value": 65, "name": "EAC RG11 snorm"}, + {"value": 56, "name": "ETC2 RGB8 unorm", "jsrepr": "'etc2-rgb8unorm'"}, + {"value": 57, "name": "ETC2 RGB8 unorm srgb", "jsrepr": "'etc2-rgb8unorm-srgb'"}, + {"value": 58, "name": "ETC2 RGB8A1 unorm", "jsrepr": "'etc2-rgb8a1unorm'"}, + {"value": 59, "name": "ETC2 RGB8A1 unorm srgb", "jsrepr": "'etc2-rgb8a1unorm-srgb'"}, + {"value": 60, "name": "ETC2 RGBA8 unorm", "jsrepr": "'etc2-rgba8unorm'"}, + {"value": 61, "name": "ETC2 RGBA8 unorm srgb", "jsrepr": "'etc2-rgba8unorm-srgb'"}, + {"value": 62, "name": "EAC R11 unorm", "jsrepr": "'eac-r11unorm'"}, + {"value": 63, "name": "EAC R11 snorm", "jsrepr": "'eac-r11snorm'"}, + {"value": 64, "name": "EAC RG11 unorm", "jsrepr": "'eac-rg11unorm'"}, + {"value": 65, "name": "EAC RG11 snorm", "jsrepr": "'eac-rg11snorm'"}, - {"value": 66, "name": "ASTC 4x4 unorm"}, - {"value": 67, "name": "ASTC 4x4 unorm srgb"}, - {"value": 68, "name": "ASTC 5x4 unorm"}, - {"value": 69, "name": "ASTC 5x4 unorm srgb"}, - {"value": 70, "name": "ASTC 5x5 unorm"}, - {"value": 71, "name": "ASTC 5x5 unorm srgb"}, - {"value": 72, "name": "ASTC 6x5 unorm"}, - {"value": 73, "name": "ASTC 6x5 unorm srgb"}, - {"value": 74, "name": "ASTC 6x6 unorm"}, - {"value": 75, "name": "ASTC 6x6 unorm srgb"}, - {"value": 76, "name": "ASTC 8x5 unorm"}, - {"value": 77, "name": "ASTC 8x5 unorm srgb"}, - {"value": 78, "name": "ASTC 8x6 unorm"}, - {"value": 79, "name": "ASTC 8x6 unorm srgb"}, - {"value": 80, "name": "ASTC 8x8 unorm"}, - {"value": 81, "name": "ASTC 8x8 unorm srgb"}, - {"value": 82, "name": "ASTC 10x5 unorm"}, - {"value": 83, "name": "ASTC 10x5 unorm srgb"}, - {"value": 84, "name": "ASTC 10x6 unorm"}, - {"value": 85, "name": "ASTC 10x6 unorm srgb"}, - {"value": 86, "name": "ASTC 10x8 unorm"}, - {"value": 87, "name": "ASTC 10x8 unorm srgb"}, - {"value": 88, "name": "ASTC 10x10 unorm"}, - {"value": 89, "name": "ASTC 10x10 unorm srgb"}, - {"value": 90, "name": "ASTC 12x10 unorm"}, - {"value": 91, "name": "ASTC 12x10 unorm srgb"}, - {"value": 92, "name": "ASTC 12x12 unorm"}, - {"value": 93, "name": "ASTC 12x12 unorm srgb"}, + {"value": 66, "name": "ASTC 4x4 unorm", "jsrepr": "'astc-4x4-unorm'"}, + {"value": 67, "name": "ASTC 4x4 unorm srgb", "jsrepr": "'astc-4x4-unorm-srgb'"}, + {"value": 68, "name": "ASTC 5x4 unorm", "jsrepr": "'astc-5x4-unorm'"}, + {"value": 69, "name": "ASTC 5x4 unorm srgb", "jsrepr": "'astc-5x4-unorm-srgb'"}, + {"value": 70, "name": "ASTC 5x5 unorm", "jsrepr": "'astc-5x5-unorm'"}, + {"value": 71, "name": "ASTC 5x5 unorm srgb", "jsrepr": "'astc-5x5-unorm-srgb'"}, + {"value": 72, "name": "ASTC 6x5 unorm", "jsrepr": "'astc-6x5-unorm'"}, + {"value": 73, "name": "ASTC 6x5 unorm srgb", "jsrepr": "'astc-6x5-unorm-srgb'"}, + {"value": 74, "name": "ASTC 6x6 unorm", "jsrepr": "'astc-6x6-unorm'"}, + {"value": 75, "name": "ASTC 6x6 unorm srgb", "jsrepr": "'astc-6x6-unorm-srgb'"}, + {"value": 76, "name": "ASTC 8x5 unorm", "jsrepr": "'astc-8x5-unorm'"}, + {"value": 77, "name": "ASTC 8x5 unorm srgb", "jsrepr": "'astc-8x5-unorm-srgb'"}, + {"value": 78, "name": "ASTC 8x6 unorm", "jsrepr": "'astc-8x6-unorm'"}, + {"value": 79, "name": "ASTC 8x6 unorm srgb", "jsrepr": "'astc-8x6-unorm-srgb'"}, + {"value": 80, "name": "ASTC 8x8 unorm", "jsrepr": "'astc-8x8-unorm'"}, + {"value": 81, "name": "ASTC 8x8 unorm srgb", "jsrepr": "'astc-8x8-unorm-srgb'"}, + {"value": 82, "name": "ASTC 10x5 unorm", "jsrepr": "'astc-10x5-unorm'"}, + {"value": 83, "name": "ASTC 10x5 unorm srgb", "jsrepr": "'astc-10x5-unorm-srgb'"}, + {"value": 84, "name": "ASTC 10x6 unorm", "jsrepr": "'astc-10x6-unorm'"}, + {"value": 85, "name": "ASTC 10x6 unorm srgb", "jsrepr": "'astc-10x6-unorm-srgb'"}, + {"value": 86, "name": "ASTC 10x8 unorm", "jsrepr": "'astc-10x8-unorm'"}, + {"value": 87, "name": "ASTC 10x8 unorm srgb", "jsrepr": "'astc-10x8-unorm-srgb'"}, + {"value": 88, "name": "ASTC 10x10 unorm", "jsrepr": "'astc-10x10-unorm'"}, + {"value": 89, "name": "ASTC 10x10 unorm srgb", "jsrepr": "'astc-10x10-unorm-srgb'"}, + {"value": 90, "name": "ASTC 12x10 unorm", "jsrepr": "'astc-12x10-unorm'"}, + {"value": 91, "name": "ASTC 12x10 unorm srgb", "jsrepr": "'astc-12x10-unorm-srgb'"}, + {"value": 92, "name": "ASTC 12x12 unorm", "jsrepr": "'astc-12x12-unorm'"}, + {"value": 93, "name": "ASTC 12x12 unorm srgb", "jsrepr": "'astc-12x12-unorm-srgb'"}, {"value": 94, "name": "R8 BG8 Biplanar 420 unorm", "tags": ["dawn"]} ]