Migrate more scripts to python3

Test: python3 scripts/run_code_generation.py
Bug: angleproject:5707
Change-Id: I5abae69c1c6bf03cc418f10beaabc80288fa1c94
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2828979
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
This commit is contained in:
Cody Northrop
2021-04-16 09:17:29 -06:00
committed by Commit Bot
parent 69a26def84
commit 14f8918c6b
34 changed files with 1224 additions and 1218 deletions

View File

@@ -4,11 +4,11 @@
"src/libANGLE/renderer/Format_table_autogen.cpp":
"969f821f7241fbc3df16864daeafa68e",
"src/libANGLE/renderer/angle_format.py":
"e5ac2fcfbc930ac2e3f3d54effeafed9",
"35b819b32d3259961da75f5c971baba4",
"src/libANGLE/renderer/angle_format_data.json":
"4b3b5d4beef95c282ba4f20fdc2b20ed",
"src/libANGLE/renderer/angle_format_map.json":
"46b589fc0fc306b2f7c97ee7bb08baee",
"src/libANGLE/renderer/gen_angle_format_table.py":
"428255701f3a3a9630593ab110ca98c1"
"70bdbceee30506d4b14bf52f2bbd8f2b"
}

View File

@@ -1,8 +1,8 @@
{
"src/libANGLE/renderer/angle_format.py":
"e5ac2fcfbc930ac2e3f3d54effeafed9",
"35b819b32d3259961da75f5c971baba4",
"src/libANGLE/renderer/gen_load_functions_table.py":
"bbc2f2cbce34313d7c06a3511eff5a1f",
"c131c494e7e0b35b65a8a097b4b8e5ce",
"src/libANGLE/renderer/load_functions_data.json":
"912670e6835fbe5074533bbeba44ef02",
"src/libANGLE/renderer/load_functions_table_autogen.cpp":

View File

@@ -1,6 +1,6 @@
{
"src/compiler/generate_parser_tools.py":
"78362c0f409423550b6b22a88c0ca64b",
"6a34ad911710a45e5644e9f79dfd2ce5",
"src/compiler/preprocessor/generate_parser.py":
"cc871de99688a35bfe32ef501f965d5a",
"src/compiler/preprocessor/preprocessor.l":

View File

@@ -1,6 +1,6 @@
{
"src/compiler/generate_parser_tools.py":
"78362c0f409423550b6b22a88c0ca64b",
"6a34ad911710a45e5644e9f79dfd2ce5",
"src/compiler/translator/generate_parser.py":
"566178ecdfae3a29803b3687fc518ebb",
"src/compiler/translator/glslang.l":

View File

@@ -1,8 +1,8 @@
{
"src/libANGLE/renderer/angle_format.py":
"e5ac2fcfbc930ac2e3f3d54effeafed9",
"35b819b32d3259961da75f5c971baba4",
"src/libANGLE/renderer/d3d/d3d11/gen_texture_format_table.py":
"8ad208de51aafef78452ae7f6cf8b340",
"bbb56f0a35bb2506524654444c8210d3",
"src/libANGLE/renderer/d3d/d3d11/texture_format_data.json":
"b491f92f2adadad269248eb17dee8821",
"src/libANGLE/renderer/d3d/d3d11/texture_format_map.json":

View File

@@ -1,6 +1,6 @@
{
"src/libANGLE/renderer/angle_format.py":
"e5ac2fcfbc930ac2e3f3d54effeafed9",
"35b819b32d3259961da75f5c971baba4",
"src/libANGLE/renderer/angle_format_map.json":
"46b589fc0fc306b2f7c97ee7bb08baee",
"src/libANGLE/renderer/dxgi_format_data.json":
@@ -8,5 +8,5 @@
"src/libANGLE/renderer/dxgi_format_map_autogen.cpp":
"974308ca798476dfaa076fb864478310",
"src/libANGLE/renderer/gen_dxgi_format_table.py":
"8540567c885f88cbac66b7dc96b2dc10"
"317faa90fd375c39cc8fbefe897604b3"
}

View File

@@ -4,5 +4,5 @@
"src/libANGLE/renderer/dxgi_support_table_autogen.cpp":
"220fadac8434f87259bc47c1473a309d",
"src/libANGLE/renderer/gen_dxgi_support_tables.py":
"c6a42175680fc5ac6fd62ba3c5e8a2f9"
"7f015104b9124627d3e962972284e507"
}

View File

@@ -4,5 +4,5 @@
"src/compiler/translator/emulated_builtin_functions_hlsl_autogen.cpp":
"eeb085d4abc08e7dd15a1db8807efed6",
"src/compiler/translator/gen_emulated_builtin_function_tables.py":
"6e8fce6e03e32cf3b6a7350865621bdb"
"0150347bc316e7c3772a7c1492c588b8"
}

View File

@@ -4,7 +4,7 @@
"src/libANGLE/es3_copy_conversion_table_autogen.cpp":
"c8418c317a331e54a6913c407e47aafb",
"src/libANGLE/gen_copy_conversion_table.py":
"52b879061499e456a3469da3d452f6c5",
"0a73b7580342b9e27d4c71ade3af55e5",
"src/libANGLE/renderer/angle_format.py":
"e5ac2fcfbc930ac2e3f3d54effeafed9"
"35b819b32d3259961da75f5c971baba4"
}

View File

@@ -2,11 +2,11 @@
"src/libANGLE/es3_format_type_combinations.json":
"b7d0c224864b87afd09a557a0099c2bb",
"src/libANGLE/format_map_autogen.cpp":
"18a0f3e044cfefb36cbbdfec6b4b1654",
"b71c162b72facbbe89d2366b5e7cc4bf",
"src/libANGLE/format_map_data.json":
"2e5db33b6d6b142b569123f614f3ddb7",
"src/libANGLE/gen_format_map.py":
"4062c6247b9c81ab3e8e6422fbd55349",
"2421e2cfb4e074ae3fa6baa031c6394e",
"src/libANGLE/renderer/angle_format.py":
"e5ac2fcfbc930ac2e3f3d54effeafed9"
"35b819b32d3259961da75f5c971baba4"
}

View File

@@ -1,10 +1,10 @@
{
"src/libANGLE/renderer/angle_format.py":
"e5ac2fcfbc930ac2e3f3d54effeafed9",
"35b819b32d3259961da75f5c971baba4",
"src/libANGLE/renderer/angle_format_map.json":
"46b589fc0fc306b2f7c97ee7bb08baee",
"src/libANGLE/renderer/gen_angle_format_table.py":
"428255701f3a3a9630593ab110ca98c1",
"70bdbceee30506d4b14bf52f2bbd8f2b",
"src/libANGLE/renderer/metal/shaders/blit.metal":
"2f6286729703039d41d0f6a109a23ac2",
"src/libANGLE/renderer/metal/shaders/clear.metal":
@@ -22,7 +22,7 @@
"src/libANGLE/renderer/metal/shaders/gen_mipmap.metal":
"54dca94c48bead446624079070b9b309",
"src/libANGLE/renderer/metal/shaders/gen_mtl_internal_shaders.py":
"af7a98ffaa3f3885b1e3cc7160c8549b",
"ba74ebbfa2ceb825f36e84f2985b3d3d",
"src/libANGLE/renderer/metal/shaders/mtl_default_shaders_src_autogen.inc":
"94260983944013d7b094aaab74f37a17",
"src/libANGLE/renderer/metal/shaders/visibility.metal":

View File

@@ -1,6 +1,6 @@
{
"src/libANGLE/renderer/angle_format.py":
"e5ac2fcfbc930ac2e3f3d54effeafed9",
"35b819b32d3259961da75f5c971baba4",
"src/libANGLE/renderer/angle_format_map.json":
"46b589fc0fc306b2f7c97ee7bb08baee",
"src/libANGLE/renderer/metal/gen_mtl_format_table.py":

View File

@@ -2,13 +2,13 @@
"scripts/gl.xml":
"2a73a58a7e26d8676a2c0af6d528cae6",
"src/libANGLE/renderer/angle_format.py":
"e5ac2fcfbc930ac2e3f3d54effeafed9",
"35b819b32d3259961da75f5c971baba4",
"src/libANGLE/renderer/gl/DispatchTableGL_autogen.cpp":
"54a5c8b87d54114ee61a4c535931ea48",
"src/libANGLE/renderer/gl/DispatchTableGL_autogen.h":
"e41b2685228feb5c20b5c1400837c055",
"src/libANGLE/renderer/gl/generate_gl_dispatch_table.py":
"30e1c2d60a3f81bcc354dcad5a8d9ec2",
"d133c757b44279ad205183c9c9c9b598",
"src/libANGLE/renderer/gl/gl_bindings_data.json":
"6f46f537e07b457850c060ef0c7b76c5",
"src/libANGLE/renderer/gl/null_functions.cpp":

View File

@@ -1,12 +1,12 @@
{
"src/libANGLE/renderer/angle_format.py":
"e5ac2fcfbc930ac2e3f3d54effeafed9",
"35b819b32d3259961da75f5c971baba4",
"src/libANGLE/renderer/angle_format_map.json":
"46b589fc0fc306b2f7c97ee7bb08baee",
"src/libANGLE/renderer/vulkan/gen_vk_format_table.py":
"bcd28f46d41727b93943129edfeda12d",
"ffeebc0e8ec8db860e472c7cf04cd880",
"src/libANGLE/renderer/vulkan/vk_format_map.json":
"3b4563c98576280cbe4bcb9af4aafdde",
"src/libANGLE/renderer/vulkan/vk_format_table_autogen.cpp":
"c5e18754528e417628eb72186b8465ce"
"459f920b945c11152539e9241de46a95"
}

View File

@@ -1,6 +1,6 @@
{
"src/libANGLE/renderer/angle_format.py":
"e5ac2fcfbc930ac2e3f3d54effeafed9",
"35b819b32d3259961da75f5c971baba4",
"src/libANGLE/renderer/vulkan/gen_vk_mandatory_format_support_table.py":
"3e2b8cd80373275e862bb7c8ba20a745",
"src/libANGLE/renderer/vulkan/vk_format_map.json":

View File

@@ -2,7 +2,7 @@
"src/tests/restricted_traces/.gitignore":
"9e34de23403add0a73d889d998971292",
"src/tests/restricted_traces/gen_restricted_traces.py":
"7cc5d772c8e18a58224ab4436fc3a205",
"f700505c2ba8299a6ce68962763d7f2d",
"src/tests/restricted_traces/restricted_traces.json":
"1ba9185b74b0c64bcbd98226219f0e3c",
"src/tests/restricted_traces/restricted_traces_autogen.cpp":

View File

@@ -1,6 +1,6 @@
{
"src/common/gen_uniform_type_table.py":
"714cdb13f7c30af4890922a856456ddb",
"f57829d5e5b97ac1dcb8a95316736de9",
"src/common/uniform_type_info_autogen.cpp":
"85b351f2d5525d1af422a880e361a2bd"
}

View File

@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# Copyright 2017 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.
@@ -255,9 +255,9 @@ def main():
outputs = ['uniform_type_info_autogen.cpp']
if sys.argv[1] == 'inputs':
print ','.join(inputs)
print(','.join(inputs))
elif sys.argv[1] == 'outputs':
print ','.join(outputs)
print(','.join(outputs))
else:
print('Invalid script parameters')
return 1

View File

@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# Copyright 2019 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.
@@ -148,12 +148,12 @@ def generate_parser(basename, generate_header):
# Call flex and bison to generate the lexer and parser.
flex_result = run_flex(basename)
if flex_result != 0:
print 'Failed to run flex. Error ' + str(flex_result)
print('Failed to run flex. Error %s' % str(flex_result))
return 1
bison_result = run_bison(basename, generate_header)
if bison_result != 0:
print 'Failed to run bison. Error ' + str(bison_result)
print('Failed to run bison. Error %s' % str(bison_result))
return 2
return 0

View File

@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# Copyright 2017 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.
@@ -122,9 +122,9 @@ def main():
outputs = [hlsl_fname]
if sys.argv[1] == 'inputs':
print ','.join(inputs)
print(','.join(inputs))
elif sys.argv[1] == 'outputs':
print ','.join(outputs)
print(','.join(outputs))
else:
print('Invalid script parameters')
return 1

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# Copyright 2016 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.
@@ -77,9 +77,9 @@ def main():
outputs = [out_file_name]
if sys.argv[1] == 'inputs':
print ','.join(inputs)
print(','.join(inputs))
elif sys.argv[1] == 'outputs':
print ','.join(outputs)
print(','.join(outputs))
else:
print('Invalid script parameters')
return 1
@@ -89,7 +89,7 @@ def main():
format_map = {}
for description, data in json_data.iteritems():
for description, data in sorted(json_data.items()):
for texture_format, framebuffer_format in data:
if texture_format not in format_map:
format_map[texture_format] = []
@@ -97,7 +97,7 @@ def main():
texture_format_cases = ""
for texture_format, framebuffer_formats in sorted(format_map.iteritems()):
for texture_format, framebuffer_formats in sorted(format_map.items()):
texture_format_cases += parse_texture_format_case(texture_format, framebuffer_formats)
with open(out_file_name, 'wt') as out_file:

View File

@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# Copyright 2016 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.
@@ -117,7 +117,7 @@ def parse_type_case(type, result):
def parse_format_case(format, type_map):
type_cases = ""
for type, internal_format in sorted(type_map.iteritems()):
for type, internal_format in sorted(type_map.items()):
type_cases += parse_type_case(type, internal_format)
return template_format_case.format(format=format, type_cases=type_cases)
@@ -132,9 +132,9 @@ def main():
outputs = ['format_map_autogen.cpp']
if sys.argv[1] == 'inputs':
print ','.join(inputs)
print(','.join(inputs))
elif sys.argv[1] == 'outputs':
print ','.join(outputs)
print(','.join(outputs))
else:
print('Invalid script parameters')
return 1
@@ -146,7 +146,7 @@ def main():
format_cases = ""
for format, type_map in sorted(format_map.iteritems()):
for format, type_map in sorted(format_map.items()):
format_cases += parse_format_case(format, type_map)
combo_data_file = 'es3_format_type_combinations.json'
@@ -179,9 +179,9 @@ def main():
es3_combo_cases = ""
for format, type_combos in combos.iteritems():
for format, type_combos in sorted(combos.items()):
this_type_cases = ""
for type, combos in type_combos.iteritems():
for type, combos in sorted(type_combos.items()):
internal_format_cases = ""
for internal_format in combos:
internal_format_cases += " case " + internal_format + ":\n"

View File

@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# Copyright 2016 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.
@@ -53,7 +53,7 @@ def load_with_override(override_path):
results = load_without_override()
overrides = load_json(override_path)
for k, v in overrides.iteritems():
for k, v in sorted(overrides.items()):
results[k] = v
return results
@@ -95,7 +95,7 @@ def get_component_type(format_id):
def get_channel_tokens(format_id):
r = re.compile(r'([' + kChannels + '][\d]+)')
return filter(r.match, r.split(format_id))
return list(filter(r.match, r.split(format_id)))
def get_channels(format_id):

View File

@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# Copyright 2015 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.
@@ -84,9 +84,10 @@ def get_swizzle_format_id(internal_format, angle_format):
internal_format)
bits = angle_format['bits']
max_component_bits = max(bits.itervalues())
max_component_bits = max(bits.values())
bits_iter = iter(list(sorted(bits.values())))
channels_different = not all(
[component_bits == bits.itervalues().next() for component_bits in bits.itervalues()])
[component_bits == next(bits_iter) for component_bits in bits.values()])
# The format itself can be used for swizzles if it can be accessed as a render target and
# sampled and the bit count for all 4 channels is the same.
@@ -196,7 +197,7 @@ def json_to_table_data(internal_format, format_name, prefix, json):
"condition": prefix,
}
for k, v in json.iteritems():
for k, v in sorted(json.items()):
parsed[k] = v
# Derived values.
@@ -217,15 +218,15 @@ def parse_json_angle_format_case(format_name, angle_format, json_data):
support_test = None
fallback = None
for k, v in angle_format.iteritems():
for k, v in sorted(angle_format.items()):
if k == "FL10Plus":
assert support_test is None
support_test = "OnlyFL10Plus(deviceCaps)"
for k2, v2 in v.iteritems():
for k2, v2 in sorted(v.items()):
supported_case[k2] = v2
elif k == "FL9_3":
split = True
for k2, v2 in v.iteritems():
for k2, v2 in sorted(v.items()):
unsupported_case[k2] = v2
elif k == "supportTest":
assert support_test is None
@@ -250,7 +251,7 @@ def parse_json_angle_format_case(format_name, angle_format, json_data):
def parse_json_into_switch_angle_format_string(json_map, json_data):
table_data = ''
for internal_format, format_name in sorted(json_map.iteritems()):
for internal_format, format_name in sorted(json_map.items()):
if format_name not in json_data:
continue
@@ -289,9 +290,9 @@ def main():
outputs = ['texture_format_table_autogen.cpp']
if sys.argv[1] == 'inputs':
print ','.join(inputs)
print(','.join(inputs))
elif sys.argv[1] == 'outputs':
print ','.join(outputs)
print(','.join(outputs))
else:
print('Invalid script parameters')
return 1

View File

@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# Copyright 2016 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.
@@ -93,7 +93,7 @@ const Format *GetFormatInfoTable()
def ceil_int(value, mod):
assert mod > 0 and value > 0, 'integer modulation should be larger than 0'
return (value + mod - 1) / mod
return (value + mod - 1) // mod
def is_depth_stencil(angle_format):
@@ -287,7 +287,7 @@ def json_to_table_data(format_id, json, angle_to_gl):
"fastCopyFunctions": "NoCopyFunctions",
}
for k, v in json.iteritems():
for k, v in sorted(json.items()):
parsed[k] = v
if "glInternalFormat" not in parsed:
@@ -407,9 +407,9 @@ def main():
outputs = ['Format_table_autogen.cpp', 'FormatID_autogen.h']
if sys.argv[1] == 'inputs':
print ','.join(inputs)
print(','.join(inputs))
elif sys.argv[1] == 'outputs':
print ','.join(outputs)
print(','.join(outputs))
else:
print('Invalid script parameters')
return 1

View File

@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# Copyright 2016 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.
@@ -10,6 +10,8 @@
import sys
import angle_format
from functools import reduce
template_cpp = """// GENERATED FILE - DO NOT EDIT.
// Generated by {script_name} using data from {data_source_name}.
//
@@ -93,9 +95,9 @@ def main():
outputs = ['dxgi_format_map_autogen.cpp']
if sys.argv[1] == 'inputs':
print ','.join(inputs)
print(','.join(inputs))
elif sys.argv[1] == 'outputs':
print ','.join(outputs)
print(','.join(outputs))
else:
print('Invalid script parameters')
return 1
@@ -119,7 +121,7 @@ def main():
all_angle = angle_format.get_all_angle_formats()
for dxgi_format, a_format in sorted(dxgi_map.iteritems()):
for dxgi_format, a_format in sorted(dxgi_map.items()):
found = [ctype in dxgi_format for ctype in types.keys()]
count = reduce((lambda a, b: int(a) + int(b)), found)
@@ -127,7 +129,8 @@ def main():
component_type = 'GL_NONE'
if count == 1:
gltype = next(gltype for ctype, gltype in types.iteritems() if ctype in dxgi_format)
gltype = next(
gltype for ctype, gltype in sorted(types.items()) if ctype in dxgi_format)
component_cases += format_case(dxgi_format, gltype)
else:
component_cases += undefined_case(dxgi_format)

View File

@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# Copyright 2015 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.
@@ -183,7 +183,7 @@ def do_format(format_data):
'mipAutoGen': macro_prefix + 'MIPGEN'
}
for format_name, format_support in sorted(format_data.iteritems()):
for format_name, format_support in sorted(format_data.items()):
always_supported = set()
never_supported = set()
@@ -198,7 +198,7 @@ def do_format(format_data):
fl_10_0_check_10_1_supported = set()
fl_10_0_check_11_0_supported = set()
for json_flag, support in format_support.iteritems():
for json_flag, support in sorted(format_support.items()):
d3d_flag = [json_flag_to_d3d[json_flag]]
@@ -306,9 +306,9 @@ def main():
outputs = ['dxgi_support_table_autogen.cpp']
if sys.argv[1] == 'inputs':
print ','.join(inputs)
print(','.join(inputs))
elif sys.argv[1] == 'outputs':
print ','.join(outputs)
print(','.join(outputs))
else:
print('Invalid script parameters')
return 1

View File

@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# Copyright 2015 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.
@@ -112,7 +112,7 @@ def get_load_func(func_name, type_functions):
snippet += "{\n"
snippet += " switch (type)\n"
snippet += " {\n"
for gl_type, load_function in sorted(type_functions.iteritems()):
for gl_type, load_function in sorted(type_functions.items()):
snippet += " case " + gl_type + ":\n"
requiresConversion = str('LoadToNative<' not in load_function).lower()
snippet += " return LoadImageFunctionInfo(" + load_function + ", " + requiresConversion + ");\n"
@@ -135,14 +135,14 @@ def get_unknown_load_func(angle_to_type_map, internal_format):
def parse_json(json_data):
table_data = ''
load_functions_data = ''
for internal_format, angle_to_type_map in sorted(json_data.iteritems()):
for internal_format, angle_to_type_map in sorted(json_data.items()):
s = ' '
table_data += s + 'case ' + internal_format + ':\n'
do_switch = len(
angle_to_type_map) > 1 or angle_to_type_map.keys()[0] != angle_format_unknown
do_switch = len(angle_to_type_map) > 1 or list(
angle_to_type_map)[0] != angle_format_unknown
if do_switch:
table_data += s + '{\n'
@@ -151,7 +151,7 @@ def parse_json(json_data):
table_data += s + '{\n'
s += ' '
for angle_format, type_functions in sorted(angle_to_type_map.iteritems()):
for angle_format, type_functions in sorted(angle_to_type_map.items()):
if angle_format == angle_format_unknown:
continue
@@ -163,7 +163,8 @@ def parse_json(json_data):
table_data += s + ' return ' + func_name + ';\n'
if angle_format_unknown in angle_to_type_map:
for gl_type, load_function in angle_to_type_map[angle_format_unknown].iteritems():
for gl_type, load_function in sorted(
angle_to_type_map[angle_format_unknown].items()):
if gl_type not in type_functions:
type_functions[gl_type] = load_function
@@ -201,9 +202,9 @@ def main():
outputs = ['load_functions_table_autogen.cpp']
if sys.argv[1] == 'inputs':
print ','.join(inputs)
print(','.join(inputs))
elif sys.argv[1] == 'outputs':
print ','.join(outputs)
print(','.join(outputs))
else:
print('Invalid script parameters')
return 1

View File

@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# Copyright 2017 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.
@@ -261,9 +261,9 @@ def main():
]
if sys.argv[1] == 'inputs':
print ','.join(inputs)
print(','.join(inputs))
elif sys.argv[1] == 'outputs':
print ','.join(outputs)
print(','.join(outputs))
else:
print('Invalid script parameters')
return 1
@@ -331,7 +331,7 @@ def main():
# Used later in the NULL bindings.
all_entry_points = []
for comment, entry_points in json_data.iteritems():
for comment, entry_points in sorted(json_data.items()):
for entry_point_no_prefix in entry_points:
entry_point = "gl" + entry_point_no_prefix
@@ -398,7 +398,7 @@ def main():
raise Exception('Entry point ' + entry_point + ' not found in the xml.')
table_data = []
for comment, entry_points in sorted(json_data.iteritems()):
for comment, entry_points in sorted(json_data.items()):
formatted = [" // " + comment]
formatted += [format_ep_decl(entry_point) for entry_point in sorted(entry_points)]
@@ -414,25 +414,25 @@ def main():
out.write(dispatch_table_header)
gl_data = []
for gl_required, entry_points in sorted(gl_requirements.iteritems()):
for gl_required, entry_points in sorted(gl_requirements.items()):
gl_data.append(format_requirements_lines(gl_required, entry_points))
gl_extensions_data = []
for extension, entry_points in sorted(gl_extension_requirements.iteritems()):
for extension, entry_points in sorted(gl_extension_requirements.items()):
gl_extensions_data.append(
format_extension_requirements_lines(extension, entry_points, "gl"))
gles2_data = []
for gles2_required, entry_points in sorted(gles2_requirements.iteritems()):
for gles2_required, entry_points in sorted(gles2_requirements.items()):
gles2_data.append(format_requirements_lines(gles2_required, entry_points))
gles2_extensions_data = []
for extension, entry_points in sorted(gles2_extension_requirements.iteritems()):
for extension, entry_points in sorted(gles2_extension_requirements.items()):
gles2_extensions_data.append(
format_extension_requirements_lines(extension, entry_points, "gles2"))
both_extensions_data = []
for extension, entry_points in sorted(both_extension_requirements.iteritems()):
for extension, entry_points in sorted(both_extension_requirements.items()):
both_extensions_data.append(
format_extension_requirements_lines(extension, entry_points, "gles2|gl"))

View File

@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# Copyright 2019 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.
@@ -81,9 +81,9 @@ def main():
outputs = ['format_autogen.h', 'mtl_default_shaders_src_autogen.inc']
if sys.argv[1] == 'inputs':
print ','.join(inputs)
print(','.join(inputs))
elif sys.argv[1] == 'outputs':
print ','.join(outputs)
print(','.join(outputs))
else:
print('Invalid script parameters')
return 1
@@ -111,7 +111,8 @@ def main():
temp_fname = 'temp_master_source.metal'
with open(temp_fname, 'wb') as temp_file:
for src_file in src_files:
temp_file.write('#include "%s"\n' % src_file)
include_str = '#include "' + src_file + '" \n'
temp_file.write(include_str.encode('utf-8'))
args = [clang]
if not os.name == 'nt':
@@ -121,7 +122,7 @@ def main():
combined_source = subprocess.check_output(args)
# Remove '@@' tokens
final_combined_src_string = combined_source.replace('@@', '')
final_combined_src_string = combined_source.replace('@@'.encode('utf-8'), ''.encode('utf-8'))
# Generate final file:
with open('mtl_default_shaders_src_autogen.inc', 'wt') as out_file:
@@ -129,7 +130,7 @@ def main():
out_file.write('\n')
out_file.write('// C++ string version of combined Metal default shaders.\n\n')
out_file.write('\n\nstatic char gDefaultMetallibSrc[] = R"(\n')
out_file.write(final_combined_src_string)
out_file.write(final_combined_src_string.decode("utf-8"))
out_file.write('\n')
out_file.write(')";\n')
out_file.close()

View File

@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# Copyright 2016 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.
@@ -122,7 +122,7 @@ def verify_vk_map_keys(angle_to_gl, vk_json_data):
for table in ["map", "fallbacks"]:
for angle_format in vk_json_data[table].keys():
if not angle_format in angle_to_gl.keys():
print "Invalid format " + angle_format + " in vk_format_map.json in " + table
print("Invalid format " + angle_format + " in vk_format_map.json in " + table)
no_error = False
return no_error
@@ -242,9 +242,9 @@ def main():
outputs = [out_file_name]
if sys.argv[1] == 'inputs':
print ','.join(inputs)
print(','.join(inputs))
elif sys.argv[1] == 'outputs':
print ','.join(outputs)
print(','.join(outputs))
else:
print('Invalid script parameters')
return 1
@@ -258,23 +258,23 @@ def main():
format_id_cases = [
get_format_id_case(format_id, vk_format)
for format_id, vk_format in vk_json_data["map"].iteritems()
for format_id, vk_format in sorted(vk_json_data["map"].items())
]
vk_format_cases = [
get_vk_format_case(format_id, vk_format)
for format_id, vk_format in vk_json_data["map"].iteritems()
for format_id, vk_format in sorted(vk_json_data["map"].items())
]
vk_cases = [
gen_format_case(angle, gl, vk_json_data) for angle, gl in sorted(angle_to_gl.iteritems())
gen_format_case(angle, gl, vk_json_data) for angle, gl in sorted(angle_to_gl.items())
]
output_cpp = template_table_autogen_cpp.format(
format_case_data="\n".join(vk_cases),
format_id_cases=",\n".join(format_id_cases),
vk_format_cases="".join(vk_format_cases),
script_name=__file__,
script_name=os.path.basename(__file__),
out_file_name=out_file_name,
input_file_name=input_file_name)

View File

@@ -2372,153 +2372,153 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
VkFormat GetVkFormatFromFormatID(angle::FormatID formatID)
{
static constexpr angle::FormatMap<VkFormat> kMap = {
{angle::FormatID::R8G8_USCALED, VK_FORMAT_R8G8_USCALED},
{angle::FormatID::D32_FLOAT_S8X24_UINT, VK_FORMAT_D32_SFLOAT_S8_UINT},
{angle::FormatID::ETC2_R8G8B8_SRGB_BLOCK, VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK},
{angle::FormatID::R32G32B32A32_SINT, VK_FORMAT_R32G32B32A32_SINT},
{angle::FormatID::ASTC_10x8_SRGB_BLOCK, VK_FORMAT_ASTC_10x8_SRGB_BLOCK},
{angle::FormatID::R16G16B16_USCALED, VK_FORMAT_R16G16B16_USCALED},
{angle::FormatID::BC4_RED_SNORM_BLOCK, VK_FORMAT_BC4_SNORM_BLOCK},
{angle::FormatID::R16G16B16_SNORM, VK_FORMAT_R16G16B16_SNORM},
{angle::FormatID::S8_UINT, VK_FORMAT_S8_UINT},
{angle::FormatID::R8G8B8_USCALED, VK_FORMAT_R8G8B8_USCALED},
{angle::FormatID::ASTC_5x4_UNORM_BLOCK, VK_FORMAT_ASTC_5x4_UNORM_BLOCK},
{angle::FormatID::BC5_RG_UNORM_BLOCK, VK_FORMAT_BC5_UNORM_BLOCK},
{angle::FormatID::ASTC_8x5_SRGB_BLOCK, VK_FORMAT_ASTC_8x5_SRGB_BLOCK},
{angle::FormatID::R8G8_SNORM, VK_FORMAT_R8G8_SNORM},
{angle::FormatID::R16G16B16_UINT, VK_FORMAT_R16G16B16_UINT},
{angle::FormatID::ETC2_R8G8B8A8_UNORM_BLOCK, VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK},
{angle::FormatID::R16G16_UINT, VK_FORMAT_R16G16_UINT},
{angle::FormatID::R16_USCALED, VK_FORMAT_R16_USCALED},
{angle::FormatID::BC3_RGBA_UNORM_SRGB_BLOCK, VK_FORMAT_BC3_SRGB_BLOCK},
{angle::FormatID::R8_SINT, VK_FORMAT_R8_SINT},
{angle::FormatID::R11G11B10_FLOAT, VK_FORMAT_B10G11R11_UFLOAT_PACK32},
{angle::FormatID::D24_UNORM_S8_UINT, VK_FORMAT_D24_UNORM_S8_UINT},
{angle::FormatID::B4G4R4A4_UNORM, VK_FORMAT_B4G4R4A4_UNORM_PACK16},
{angle::FormatID::ASTC_12x10_UNORM_BLOCK, VK_FORMAT_ASTC_12x10_UNORM_BLOCK},
{angle::FormatID::R8G8B8_SSCALED, VK_FORMAT_R8G8B8_SSCALED},
{angle::FormatID::R32G32B32_UINT, VK_FORMAT_R32G32B32_UINT},
{angle::FormatID::R16_SINT, VK_FORMAT_R16_SINT},
{angle::FormatID::D16_UNORM, VK_FORMAT_D16_UNORM},
{angle::FormatID::ASTC_4x4_UNORM_BLOCK, VK_FORMAT_ASTC_4x4_UNORM_BLOCK},
{angle::FormatID::ASTC_8x8_SRGB_BLOCK, VK_FORMAT_ASTC_8x8_SRGB_BLOCK},
{angle::FormatID::R8_USCALED, VK_FORMAT_R8_USCALED},
{angle::FormatID::R8G8B8_UNORM_SRGB, VK_FORMAT_R8G8B8_SRGB},
{angle::FormatID::BPTC_RGB_UNSIGNED_FLOAT_BLOCK, VK_FORMAT_BC6H_UFLOAT_BLOCK},
{angle::FormatID::B5G5R5A1_UNORM, VK_FORMAT_B5G5R5A1_UNORM_PACK16},
{angle::FormatID::R16G16_SSCALED, VK_FORMAT_R16G16_SSCALED},
{angle::FormatID::B8G8R8A8_UNORM_SRGB, VK_FORMAT_B8G8R8A8_SRGB},
{angle::FormatID::BC3_RGBA_UNORM_BLOCK, VK_FORMAT_BC3_UNORM_BLOCK},
{angle::FormatID::G8_B8R8_2PLANE_420_UNORM, VK_FORMAT_G8_B8R8_2PLANE_420_UNORM},
{angle::FormatID::R16_FLOAT, VK_FORMAT_R16_SFLOAT},
{angle::FormatID::R8G8B8A8_SNORM, VK_FORMAT_R8G8B8A8_SNORM},
{angle::FormatID::R8G8B8A8_SSCALED, VK_FORMAT_R8G8B8A8_SSCALED},
{angle::FormatID::R8_UNORM_SRGB, VK_FORMAT_R8_SRGB},
{angle::FormatID::BC1_RGBA_UNORM_SRGB_BLOCK, VK_FORMAT_BC1_RGBA_SRGB_BLOCK},
{angle::FormatID::A1R5G5B5_UNORM, VK_FORMAT_A1R5G5B5_UNORM_PACK16},
{angle::FormatID::ASTC_10x10_SRGB_BLOCK, VK_FORMAT_ASTC_10x10_SRGB_BLOCK},
{angle::FormatID::R10G10B10A2_UNORM, VK_FORMAT_A2B10G10R10_UNORM_PACK32},
{angle::FormatID::ASTC_10x10_UNORM_BLOCK, VK_FORMAT_ASTC_10x10_UNORM_BLOCK},
{angle::FormatID::ASTC_10x5_SRGB_BLOCK, VK_FORMAT_ASTC_10x5_SRGB_BLOCK},
{angle::FormatID::ASTC_10x5_UNORM_BLOCK, VK_FORMAT_ASTC_10x5_UNORM_BLOCK},
{angle::FormatID::ASTC_10x6_SRGB_BLOCK, VK_FORMAT_ASTC_10x6_SRGB_BLOCK},
{angle::FormatID::ASTC_10x6_UNORM_BLOCK, VK_FORMAT_ASTC_10x6_UNORM_BLOCK},
{angle::FormatID::ASTC_10x8_SRGB_BLOCK, VK_FORMAT_ASTC_10x8_SRGB_BLOCK},
{angle::FormatID::ASTC_10x8_UNORM_BLOCK, VK_FORMAT_ASTC_10x8_UNORM_BLOCK},
{angle::FormatID::ASTC_12x10_SRGB_BLOCK, VK_FORMAT_ASTC_12x10_SRGB_BLOCK},
{angle::FormatID::ASTC_12x10_UNORM_BLOCK, VK_FORMAT_ASTC_12x10_UNORM_BLOCK},
{angle::FormatID::ASTC_12x12_SRGB_BLOCK, VK_FORMAT_ASTC_12x12_SRGB_BLOCK},
{angle::FormatID::ASTC_12x12_UNORM_BLOCK, VK_FORMAT_ASTC_12x12_UNORM_BLOCK},
{angle::FormatID::ASTC_4x4_SRGB_BLOCK, VK_FORMAT_ASTC_4x4_SRGB_BLOCK},
{angle::FormatID::ASTC_4x4_UNORM_BLOCK, VK_FORMAT_ASTC_4x4_UNORM_BLOCK},
{angle::FormatID::ASTC_5x4_SRGB_BLOCK, VK_FORMAT_ASTC_5x4_SRGB_BLOCK},
{angle::FormatID::ASTC_8x5_UNORM_BLOCK, VK_FORMAT_ASTC_8x5_UNORM_BLOCK},
{angle::FormatID::R16G16B16A16_USCALED, VK_FORMAT_R16G16B16A16_USCALED},
{angle::FormatID::R8G8B8A8_UNORM_SRGB, VK_FORMAT_R8G8B8A8_SRGB},
{angle::FormatID::NONE, VK_FORMAT_UNDEFINED},
{angle::FormatID::R32G32_UINT, VK_FORMAT_R32G32_UINT},
{angle::FormatID::R16G16_SNORM, VK_FORMAT_R16G16_SNORM},
{angle::FormatID::R16_UNORM, VK_FORMAT_R16_UNORM},
{angle::FormatID::R10G10B10A2_SINT, VK_FORMAT_A2B10G10R10_SINT_PACK32},
{angle::FormatID::R16G16B16A16_FLOAT, VK_FORMAT_R16G16B16A16_SFLOAT},
{angle::FormatID::ASTC_5x4_UNORM_BLOCK, VK_FORMAT_ASTC_5x4_UNORM_BLOCK},
{angle::FormatID::ASTC_5x5_SRGB_BLOCK, VK_FORMAT_ASTC_5x5_SRGB_BLOCK},
{angle::FormatID::EAC_R11_SNORM_BLOCK, VK_FORMAT_EAC_R11_SNORM_BLOCK},
{angle::FormatID::ASTC_8x6_SRGB_BLOCK, VK_FORMAT_ASTC_8x6_SRGB_BLOCK},
{angle::FormatID::R8G8B8A8_USCALED, VK_FORMAT_R8G8B8A8_USCALED},
{angle::FormatID::ASTC_5x5_UNORM_BLOCK, VK_FORMAT_ASTC_5x5_UNORM_BLOCK},
{angle::FormatID::ASTC_6x5_SRGB_BLOCK, VK_FORMAT_ASTC_6x5_SRGB_BLOCK},
{angle::FormatID::ASTC_6x5_UNORM_BLOCK, VK_FORMAT_ASTC_6x5_UNORM_BLOCK},
{angle::FormatID::R8G8B8A8_UINT, VK_FORMAT_R8G8B8A8_UINT},
{angle::FormatID::ASTC_6x6_SRGB_BLOCK, VK_FORMAT_ASTC_6x6_SRGB_BLOCK},
{angle::FormatID::ASTC_6x6_UNORM_BLOCK, VK_FORMAT_ASTC_6x6_UNORM_BLOCK},
{angle::FormatID::ASTC_8x5_SRGB_BLOCK, VK_FORMAT_ASTC_8x5_SRGB_BLOCK},
{angle::FormatID::ASTC_8x5_UNORM_BLOCK, VK_FORMAT_ASTC_8x5_UNORM_BLOCK},
{angle::FormatID::ASTC_8x6_SRGB_BLOCK, VK_FORMAT_ASTC_8x6_SRGB_BLOCK},
{angle::FormatID::ASTC_8x6_UNORM_BLOCK, VK_FORMAT_ASTC_8x6_UNORM_BLOCK},
{angle::FormatID::ASTC_8x8_SRGB_BLOCK, VK_FORMAT_ASTC_8x8_SRGB_BLOCK},
{angle::FormatID::ASTC_8x8_UNORM_BLOCK, VK_FORMAT_ASTC_8x8_UNORM_BLOCK},
{angle::FormatID::B10G10R10A2_UNORM, VK_FORMAT_A2R10G10B10_UNORM_PACK32},
{angle::FormatID::B4G4R4A4_UNORM, VK_FORMAT_B4G4R4A4_UNORM_PACK16},
{angle::FormatID::B5G5R5A1_UNORM, VK_FORMAT_B5G5R5A1_UNORM_PACK16},
{angle::FormatID::B5G6R5_UNORM, VK_FORMAT_B5G6R5_UNORM_PACK16},
{angle::FormatID::B8G8R8A8_UNORM, VK_FORMAT_B8G8R8A8_UNORM},
{angle::FormatID::B8G8R8A8_UNORM_SRGB, VK_FORMAT_B8G8R8A8_SRGB},
{angle::FormatID::BC1_RGBA_UNORM_BLOCK, VK_FORMAT_BC1_RGBA_UNORM_BLOCK},
{angle::FormatID::BC1_RGBA_UNORM_SRGB_BLOCK, VK_FORMAT_BC1_RGBA_SRGB_BLOCK},
{angle::FormatID::BC1_RGB_UNORM_BLOCK, VK_FORMAT_BC1_RGB_UNORM_BLOCK},
{angle::FormatID::BC1_RGB_UNORM_SRGB_BLOCK, VK_FORMAT_BC1_RGB_SRGB_BLOCK},
{angle::FormatID::BC2_RGBA_UNORM_BLOCK, VK_FORMAT_BC2_UNORM_BLOCK},
{angle::FormatID::BC2_RGBA_UNORM_SRGB_BLOCK, VK_FORMAT_BC2_SRGB_BLOCK},
{angle::FormatID::BC3_RGBA_UNORM_BLOCK, VK_FORMAT_BC3_UNORM_BLOCK},
{angle::FormatID::BC3_RGBA_UNORM_SRGB_BLOCK, VK_FORMAT_BC3_SRGB_BLOCK},
{angle::FormatID::BC4_RED_SNORM_BLOCK, VK_FORMAT_BC4_SNORM_BLOCK},
{angle::FormatID::BC4_RED_UNORM_BLOCK, VK_FORMAT_BC4_UNORM_BLOCK},
{angle::FormatID::BC5_RG_SNORM_BLOCK, VK_FORMAT_BC5_SNORM_BLOCK},
{angle::FormatID::BC5_RG_UNORM_BLOCK, VK_FORMAT_BC5_UNORM_BLOCK},
{angle::FormatID::BPTC_RGBA_UNORM_BLOCK, VK_FORMAT_BC7_UNORM_BLOCK},
{angle::FormatID::BPTC_RGB_SIGNED_FLOAT_BLOCK, VK_FORMAT_BC6H_SFLOAT_BLOCK},
{angle::FormatID::BPTC_RGB_UNSIGNED_FLOAT_BLOCK, VK_FORMAT_BC6H_UFLOAT_BLOCK},
{angle::FormatID::BPTC_SRGB_ALPHA_UNORM_BLOCK, VK_FORMAT_BC7_SRGB_BLOCK},
{angle::FormatID::D16_UNORM, VK_FORMAT_D16_UNORM},
{angle::FormatID::D24_UNORM_S8_UINT, VK_FORMAT_D24_UNORM_S8_UINT},
{angle::FormatID::D24_UNORM_X8_UINT, VK_FORMAT_X8_D24_UNORM_PACK32},
{angle::FormatID::D32_FLOAT, VK_FORMAT_D32_SFLOAT},
{angle::FormatID::D32_FLOAT_S8X24_UINT, VK_FORMAT_D32_SFLOAT_S8_UINT},
{angle::FormatID::EAC_R11G11_SNORM_BLOCK, VK_FORMAT_EAC_R11G11_SNORM_BLOCK},
{angle::FormatID::EAC_R11G11_UNORM_BLOCK, VK_FORMAT_EAC_R11G11_UNORM_BLOCK},
{angle::FormatID::EAC_R11_SNORM_BLOCK, VK_FORMAT_EAC_R11_SNORM_BLOCK},
{angle::FormatID::EAC_R11_UNORM_BLOCK, VK_FORMAT_EAC_R11_UNORM_BLOCK},
{angle::FormatID::ETC2_R8G8B8A1_SRGB_BLOCK, VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK},
{angle::FormatID::ETC2_R8G8B8A1_UNORM_BLOCK, VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK},
{angle::FormatID::ETC2_R8G8B8A8_SRGB_BLOCK, VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK},
{angle::FormatID::ETC2_R8G8B8A8_UNORM_BLOCK, VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK},
{angle::FormatID::ETC2_R8G8B8_SRGB_BLOCK, VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK},
{angle::FormatID::ETC2_R8G8B8_UNORM_BLOCK, VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK},
{angle::FormatID::G8_B8R8_2PLANE_420_UNORM, VK_FORMAT_G8_B8R8_2PLANE_420_UNORM},
{angle::FormatID::G8_B8_R8_3PLANE_420_UNORM, VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM},
{angle::FormatID::NONE, VK_FORMAT_UNDEFINED},
{angle::FormatID::R10G10B10A2_SINT, VK_FORMAT_A2B10G10R10_SINT_PACK32},
{angle::FormatID::R10G10B10A2_SNORM, VK_FORMAT_A2B10G10R10_SNORM_PACK32},
{angle::FormatID::R10G10B10A2_SSCALED, VK_FORMAT_A2B10G10R10_SSCALED_PACK32},
{angle::FormatID::R10G10B10A2_UINT, VK_FORMAT_A2B10G10R10_UINT_PACK32},
{angle::FormatID::R10G10B10A2_UNORM, VK_FORMAT_A2B10G10R10_UNORM_PACK32},
{angle::FormatID::R10G10B10A2_USCALED, VK_FORMAT_A2B10G10R10_USCALED_PACK32},
{angle::FormatID::R11G11B10_FLOAT, VK_FORMAT_B10G11R11_UFLOAT_PACK32},
{angle::FormatID::R16G16B16A16_FLOAT, VK_FORMAT_R16G16B16A16_SFLOAT},
{angle::FormatID::R16G16B16A16_SINT, VK_FORMAT_R16G16B16A16_SINT},
{angle::FormatID::R16G16B16A16_SNORM, VK_FORMAT_R16G16B16A16_SNORM},
{angle::FormatID::R16G16B16A16_SSCALED, VK_FORMAT_R16G16B16A16_SSCALED},
{angle::FormatID::R16G16B16A16_UINT, VK_FORMAT_R16G16B16A16_UINT},
{angle::FormatID::R16G16B16A16_UNORM, VK_FORMAT_R16G16B16A16_UNORM},
{angle::FormatID::R16G16B16A16_USCALED, VK_FORMAT_R16G16B16A16_USCALED},
{angle::FormatID::R16G16B16_FLOAT, VK_FORMAT_R16G16B16_SFLOAT},
{angle::FormatID::R16G16B16_SINT, VK_FORMAT_R16G16B16_SINT},
{angle::FormatID::R16G16B16_SNORM, VK_FORMAT_R16G16B16_SNORM},
{angle::FormatID::R16G16B16_SSCALED, VK_FORMAT_R16G16B16_SSCALED},
{angle::FormatID::R16G16B16_UINT, VK_FORMAT_R16G16B16_UINT},
{angle::FormatID::R16G16B16_UNORM, VK_FORMAT_R16G16B16_UNORM},
{angle::FormatID::R16G16B16_USCALED, VK_FORMAT_R16G16B16_USCALED},
{angle::FormatID::R16G16_FLOAT, VK_FORMAT_R16G16_SFLOAT},
{angle::FormatID::R16G16_SINT, VK_FORMAT_R16G16_SINT},
{angle::FormatID::R16G16_SNORM, VK_FORMAT_R16G16_SNORM},
{angle::FormatID::R16G16_SSCALED, VK_FORMAT_R16G16_SSCALED},
{angle::FormatID::R16G16_UINT, VK_FORMAT_R16G16_UINT},
{angle::FormatID::R16G16_UNORM, VK_FORMAT_R16G16_UNORM},
{angle::FormatID::R16G16_USCALED, VK_FORMAT_R16G16_USCALED},
{angle::FormatID::R16_FLOAT, VK_FORMAT_R16_SFLOAT},
{angle::FormatID::R16_SINT, VK_FORMAT_R16_SINT},
{angle::FormatID::R16_SNORM, VK_FORMAT_R16_SNORM},
{angle::FormatID::R16_SSCALED, VK_FORMAT_R16_SSCALED},
{angle::FormatID::R16_UINT, VK_FORMAT_R16_UINT},
{angle::FormatID::R16_UNORM, VK_FORMAT_R16_UNORM},
{angle::FormatID::R16_USCALED, VK_FORMAT_R16_USCALED},
{angle::FormatID::R32G32B32A32_FLOAT, VK_FORMAT_R32G32B32A32_SFLOAT},
{angle::FormatID::R32G32B32A32_SINT, VK_FORMAT_R32G32B32A32_SINT},
{angle::FormatID::R32G32B32A32_UINT, VK_FORMAT_R32G32B32A32_UINT},
{angle::FormatID::R32G32B32_FLOAT, VK_FORMAT_R32G32B32_SFLOAT},
{angle::FormatID::R32G32B32_SINT, VK_FORMAT_R32G32B32_SINT},
{angle::FormatID::R32G32B32_UINT, VK_FORMAT_R32G32B32_UINT},
{angle::FormatID::R32G32_FLOAT, VK_FORMAT_R32G32_SFLOAT},
{angle::FormatID::R32G32_SINT, VK_FORMAT_R32G32_SINT},
{angle::FormatID::R32G32_UINT, VK_FORMAT_R32G32_UINT},
{angle::FormatID::R32_FLOAT, VK_FORMAT_R32_SFLOAT},
{angle::FormatID::R32_SINT, VK_FORMAT_R32_SINT},
{angle::FormatID::R32_UINT, VK_FORMAT_R32_UINT},
{angle::FormatID::R4G4B4A4_UNORM, VK_FORMAT_R4G4B4A4_UNORM_PACK16},
{angle::FormatID::R5G5B5A1_UNORM, VK_FORMAT_R5G5B5A1_UNORM_PACK16},
{angle::FormatID::R5G6B5_UNORM, VK_FORMAT_R5G6B5_UNORM_PACK16},
{angle::FormatID::R8G8B8A8_SINT, VK_FORMAT_R8G8B8A8_SINT},
{angle::FormatID::B8G8R8A8_UNORM, VK_FORMAT_B8G8R8A8_UNORM},
{angle::FormatID::R32G32B32A32_FLOAT, VK_FORMAT_R32G32B32A32_SFLOAT},
{angle::FormatID::R16G16B16_UNORM, VK_FORMAT_R16G16B16_UNORM},
{angle::FormatID::BC2_RGBA_UNORM_BLOCK, VK_FORMAT_BC2_UNORM_BLOCK},
{angle::FormatID::ASTC_12x12_UNORM_BLOCK, VK_FORMAT_ASTC_12x12_UNORM_BLOCK},
{angle::FormatID::ETC2_R8G8B8A8_SRGB_BLOCK, VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK},
{angle::FormatID::R10G10B10A2_SNORM, VK_FORMAT_A2B10G10R10_SNORM_PACK32},
{angle::FormatID::R8G8B8A8_SNORM, VK_FORMAT_R8G8B8A8_SNORM},
{angle::FormatID::R8G8B8A8_SSCALED, VK_FORMAT_R8G8B8A8_SSCALED},
{angle::FormatID::R8G8B8A8_UINT, VK_FORMAT_R8G8B8A8_UINT},
{angle::FormatID::R8G8B8A8_UNORM, VK_FORMAT_R8G8B8A8_UNORM},
{angle::FormatID::ASTC_6x6_SRGB_BLOCK, VK_FORMAT_ASTC_6x6_SRGB_BLOCK},
{angle::FormatID::ASTC_10x10_UNORM_BLOCK, VK_FORMAT_ASTC_10x10_UNORM_BLOCK},
{angle::FormatID::ETC2_R8G8B8A1_SRGB_BLOCK, VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK},
{angle::FormatID::R16G16B16_SSCALED, VK_FORMAT_R16G16B16_SSCALED},
{angle::FormatID::R16G16_UNORM, VK_FORMAT_R16G16_UNORM},
{angle::FormatID::D32_FLOAT, VK_FORMAT_D32_SFLOAT},
{angle::FormatID::R16G16B16A16_UNORM, VK_FORMAT_R16G16B16A16_UNORM},
{angle::FormatID::EAC_R11_UNORM_BLOCK, VK_FORMAT_EAC_R11_UNORM_BLOCK},
{angle::FormatID::R16G16B16A16_UINT, VK_FORMAT_R16G16B16A16_UINT},
{angle::FormatID::R16G16B16A16_SINT, VK_FORMAT_R16G16B16A16_SINT},
{angle::FormatID::BPTC_RGBA_UNORM_BLOCK, VK_FORMAT_BC7_UNORM_BLOCK},
{angle::FormatID::A1R5G5B5_UNORM, VK_FORMAT_A1R5G5B5_UNORM_PACK16},
{angle::FormatID::ASTC_8x6_UNORM_BLOCK, VK_FORMAT_ASTC_8x6_UNORM_BLOCK},
{angle::FormatID::EAC_R11G11_SNORM_BLOCK, VK_FORMAT_EAC_R11G11_SNORM_BLOCK},
{angle::FormatID::R10G10B10A2_SSCALED, VK_FORMAT_A2B10G10R10_SSCALED_PACK32},
{angle::FormatID::BC1_RGBA_UNORM_BLOCK, VK_FORMAT_BC1_RGBA_UNORM_BLOCK},
{angle::FormatID::R32G32_SINT, VK_FORMAT_R32G32_SINT},
{angle::FormatID::R32G32B32_FLOAT, VK_FORMAT_R32G32B32_SFLOAT},
{angle::FormatID::R8_UINT, VK_FORMAT_R8_UINT},
{angle::FormatID::ASTC_10x6_UNORM_BLOCK, VK_FORMAT_ASTC_10x6_UNORM_BLOCK},
{angle::FormatID::BC1_RGB_UNORM_BLOCK, VK_FORMAT_BC1_RGB_UNORM_BLOCK},
{angle::FormatID::R4G4B4A4_UNORM, VK_FORMAT_R4G4B4A4_UNORM_PACK16},
{angle::FormatID::BC1_RGB_UNORM_SRGB_BLOCK, VK_FORMAT_BC1_RGB_SRGB_BLOCK},
{angle::FormatID::BPTC_RGB_SIGNED_FLOAT_BLOCK, VK_FORMAT_BC6H_SFLOAT_BLOCK},
{angle::FormatID::R10G10B10A2_UINT, VK_FORMAT_A2B10G10R10_UINT_PACK32},
{angle::FormatID::ASTC_6x5_SRGB_BLOCK, VK_FORMAT_ASTC_6x5_SRGB_BLOCK},
{angle::FormatID::R16G16_FLOAT, VK_FORMAT_R16G16_SFLOAT},
{angle::FormatID::B5G6R5_UNORM, VK_FORMAT_B5G6R5_UNORM_PACK16},
{angle::FormatID::R32_FLOAT, VK_FORMAT_R32_SFLOAT},
{angle::FormatID::ASTC_12x12_SRGB_BLOCK, VK_FORMAT_ASTC_12x12_SRGB_BLOCK},
{angle::FormatID::ASTC_5x5_UNORM_BLOCK, VK_FORMAT_ASTC_5x5_UNORM_BLOCK},
{angle::FormatID::R8G8B8A8_UNORM_SRGB, VK_FORMAT_R8G8B8A8_SRGB},
{angle::FormatID::R8G8B8A8_USCALED, VK_FORMAT_R8G8B8A8_USCALED},
{angle::FormatID::R8G8B8_SINT, VK_FORMAT_R8G8B8_SINT},
{angle::FormatID::ASTC_8x8_UNORM_BLOCK, VK_FORMAT_ASTC_8x8_UNORM_BLOCK},
{angle::FormatID::R32_SINT, VK_FORMAT_R32_SINT},
{angle::FormatID::ETC2_R8G8B8A1_UNORM_BLOCK, VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK},
{angle::FormatID::R16_SSCALED, VK_FORMAT_R16_SSCALED},
{angle::FormatID::ASTC_6x6_UNORM_BLOCK, VK_FORMAT_ASTC_6x6_UNORM_BLOCK},
{angle::FormatID::R8G8B8_SNORM, VK_FORMAT_R8G8B8_SNORM},
{angle::FormatID::R16_UINT, VK_FORMAT_R16_UINT},
{angle::FormatID::R8_UNORM, VK_FORMAT_R8_UNORM},
{angle::FormatID::R32G32_FLOAT, VK_FORMAT_R32G32_SFLOAT},
{angle::FormatID::BC5_RG_SNORM_BLOCK, VK_FORMAT_BC5_SNORM_BLOCK},
{angle::FormatID::R16G16B16A16_SNORM, VK_FORMAT_R16G16B16A16_SNORM},
{angle::FormatID::R8G8_UNORM, VK_FORMAT_R8G8_UNORM},
{angle::FormatID::ASTC_10x6_SRGB_BLOCK, VK_FORMAT_ASTC_10x6_SRGB_BLOCK},
{angle::FormatID::ASTC_10x5_UNORM_BLOCK, VK_FORMAT_ASTC_10x5_UNORM_BLOCK},
{angle::FormatID::B10G10R10A2_UNORM, VK_FORMAT_A2R10G10B10_UNORM_PACK32},
{angle::FormatID::BC2_RGBA_UNORM_SRGB_BLOCK, VK_FORMAT_BC2_SRGB_BLOCK},
{angle::FormatID::R32G32B32_SINT, VK_FORMAT_R32G32B32_SINT},
{angle::FormatID::R10G10B10A2_USCALED, VK_FORMAT_A2B10G10R10_USCALED_PACK32},
{angle::FormatID::R8G8_SINT, VK_FORMAT_R8G8_SINT},
{angle::FormatID::R16G16B16A16_SSCALED, VK_FORMAT_R16G16B16A16_SSCALED},
{angle::FormatID::ASTC_10x5_SRGB_BLOCK, VK_FORMAT_ASTC_10x5_SRGB_BLOCK},
{angle::FormatID::R8_SSCALED, VK_FORMAT_R8_SSCALED},
{angle::FormatID::R16G16B16_FLOAT, VK_FORMAT_R16G16B16_SFLOAT},
{angle::FormatID::R8_SNORM, VK_FORMAT_R8_SNORM},
{angle::FormatID::R16_SNORM, VK_FORMAT_R16_SNORM},
{angle::FormatID::D24_UNORM_X8_UINT, VK_FORMAT_X8_D24_UNORM_PACK32},
{angle::FormatID::R16G16_SINT, VK_FORMAT_R16G16_SINT},
{angle::FormatID::R16G16B16_SINT, VK_FORMAT_R16G16B16_SINT},
{angle::FormatID::R8G8_SSCALED, VK_FORMAT_R8G8_SSCALED},
{angle::FormatID::EAC_R11G11_UNORM_BLOCK, VK_FORMAT_EAC_R11G11_UNORM_BLOCK},
{angle::FormatID::ASTC_10x8_UNORM_BLOCK, VK_FORMAT_ASTC_10x8_UNORM_BLOCK},
{angle::FormatID::ASTC_4x4_SRGB_BLOCK, VK_FORMAT_ASTC_4x4_SRGB_BLOCK},
{angle::FormatID::R8G8_UINT, VK_FORMAT_R8G8_UINT},
{angle::FormatID::R5G5B5A1_UNORM, VK_FORMAT_R5G5B5A1_UNORM_PACK16},
{angle::FormatID::R8G8B8_SSCALED, VK_FORMAT_R8G8B8_SSCALED},
{angle::FormatID::R8G8B8_UINT, VK_FORMAT_R8G8B8_UINT},
{angle::FormatID::G8_B8_R8_3PLANE_420_UNORM, VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM},
{angle::FormatID::ETC2_R8G8B8_UNORM_BLOCK, VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK},
{angle::FormatID::R32_UINT, VK_FORMAT_R32_UINT},
{angle::FormatID::R8G8B8_UNORM_SRGB, VK_FORMAT_R8G8B8_SRGB},
{angle::FormatID::R8G8B8_USCALED, VK_FORMAT_R8G8B8_USCALED},
{angle::FormatID::R8G8_SINT, VK_FORMAT_R8G8_SINT},
{angle::FormatID::R8G8_SNORM, VK_FORMAT_R8G8_SNORM},
{angle::FormatID::R8G8_SSCALED, VK_FORMAT_R8G8_SSCALED},
{angle::FormatID::R8G8_UINT, VK_FORMAT_R8G8_UINT},
{angle::FormatID::R8G8_UNORM, VK_FORMAT_R8G8_UNORM},
{angle::FormatID::R8G8_USCALED, VK_FORMAT_R8G8_USCALED},
{angle::FormatID::R8_SINT, VK_FORMAT_R8_SINT},
{angle::FormatID::R8_SNORM, VK_FORMAT_R8_SNORM},
{angle::FormatID::R8_SSCALED, VK_FORMAT_R8_SSCALED},
{angle::FormatID::R8_UINT, VK_FORMAT_R8_UINT},
{angle::FormatID::R8_UNORM, VK_FORMAT_R8_UNORM},
{angle::FormatID::R8_UNORM_SRGB, VK_FORMAT_R8_SRGB},
{angle::FormatID::R8_USCALED, VK_FORMAT_R8_USCALED},
{angle::FormatID::R9G9B9E5_SHAREDEXP, VK_FORMAT_E5B9G9R9_UFLOAT_PACK32},
{angle::FormatID::BC4_RED_UNORM_BLOCK, VK_FORMAT_BC4_UNORM_BLOCK},
{angle::FormatID::R32G32B32A32_UINT, VK_FORMAT_R32G32B32A32_UINT},
{angle::FormatID::BPTC_SRGB_ALPHA_UNORM_BLOCK, VK_FORMAT_BC7_SRGB_BLOCK},
{angle::FormatID::R16G16_USCALED, VK_FORMAT_R16G16_USCALED}};
{angle::FormatID::S8_UINT, VK_FORMAT_S8_UINT}};
return kMap[formatID];
}
@@ -2527,300 +2527,300 @@ angle::FormatID GetFormatIDFromVkFormat(VkFormat vkFormat)
{
switch (vkFormat)
{
case VK_FORMAT_R8G8_USCALED:
return angle::FormatID::R8G8_USCALED;
case VK_FORMAT_D32_SFLOAT_S8_UINT:
return angle::FormatID::D32_FLOAT_S8X24_UINT;
case VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:
return angle::FormatID::ETC2_R8G8B8_SRGB_BLOCK;
case VK_FORMAT_R32G32B32A32_SINT:
return angle::FormatID::R32G32B32A32_SINT;
case VK_FORMAT_ASTC_10x8_SRGB_BLOCK:
return angle::FormatID::ASTC_10x8_SRGB_BLOCK;
case VK_FORMAT_R16G16B16_USCALED:
return angle::FormatID::R16G16B16_USCALED;
case VK_FORMAT_BC4_SNORM_BLOCK:
return angle::FormatID::BC4_RED_SNORM_BLOCK;
case VK_FORMAT_R16G16B16_SNORM:
return angle::FormatID::R16G16B16_SNORM;
case VK_FORMAT_S8_UINT:
return angle::FormatID::S8_UINT;
case VK_FORMAT_R8G8B8_USCALED:
return angle::FormatID::R8G8B8_USCALED;
case VK_FORMAT_ASTC_5x4_UNORM_BLOCK:
return angle::FormatID::ASTC_5x4_UNORM_BLOCK;
case VK_FORMAT_BC5_UNORM_BLOCK:
return angle::FormatID::BC5_RG_UNORM_BLOCK;
case VK_FORMAT_ASTC_8x5_SRGB_BLOCK:
return angle::FormatID::ASTC_8x5_SRGB_BLOCK;
case VK_FORMAT_R8G8_SNORM:
return angle::FormatID::R8G8_SNORM;
case VK_FORMAT_R16G16B16_UINT:
return angle::FormatID::R16G16B16_UINT;
case VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:
return angle::FormatID::ETC2_R8G8B8A8_UNORM_BLOCK;
case VK_FORMAT_R16G16_UINT:
return angle::FormatID::R16G16_UINT;
case VK_FORMAT_R16_USCALED:
return angle::FormatID::R16_USCALED;
case VK_FORMAT_BC3_SRGB_BLOCK:
return angle::FormatID::BC3_RGBA_UNORM_SRGB_BLOCK;
case VK_FORMAT_R8_SINT:
return angle::FormatID::R8_SINT;
case VK_FORMAT_B10G11R11_UFLOAT_PACK32:
return angle::FormatID::R11G11B10_FLOAT;
case VK_FORMAT_D24_UNORM_S8_UINT:
return angle::FormatID::D24_UNORM_S8_UINT;
case VK_FORMAT_B4G4R4A4_UNORM_PACK16:
return angle::FormatID::B4G4R4A4_UNORM;
case VK_FORMAT_ASTC_12x10_UNORM_BLOCK:
return angle::FormatID::ASTC_12x10_UNORM_BLOCK;
case VK_FORMAT_R8G8B8_SSCALED:
return angle::FormatID::R8G8B8_SSCALED;
case VK_FORMAT_R32G32B32_UINT:
return angle::FormatID::R32G32B32_UINT;
case VK_FORMAT_R16_SINT:
return angle::FormatID::R16_SINT;
case VK_FORMAT_D16_UNORM:
return angle::FormatID::D16_UNORM;
case VK_FORMAT_ASTC_4x4_UNORM_BLOCK:
return angle::FormatID::ASTC_4x4_UNORM_BLOCK;
case VK_FORMAT_ASTC_8x8_SRGB_BLOCK:
return angle::FormatID::ASTC_8x8_SRGB_BLOCK;
case VK_FORMAT_R8_USCALED:
return angle::FormatID::R8_USCALED;
case VK_FORMAT_R8G8B8_SRGB:
return angle::FormatID::R8G8B8_UNORM_SRGB;
case VK_FORMAT_BC6H_UFLOAT_BLOCK:
return angle::FormatID::BPTC_RGB_UNSIGNED_FLOAT_BLOCK;
case VK_FORMAT_B5G5R5A1_UNORM_PACK16:
return angle::FormatID::B5G5R5A1_UNORM;
case VK_FORMAT_R16G16_SSCALED:
return angle::FormatID::R16G16_SSCALED;
case VK_FORMAT_B8G8R8A8_SRGB:
return angle::FormatID::B8G8R8A8_UNORM_SRGB;
case VK_FORMAT_BC3_UNORM_BLOCK:
return angle::FormatID::BC3_RGBA_UNORM_BLOCK;
case VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:
return angle::FormatID::G8_B8R8_2PLANE_420_UNORM;
case VK_FORMAT_R16_SFLOAT:
return angle::FormatID::R16_FLOAT;
case VK_FORMAT_R8G8B8A8_SNORM:
return angle::FormatID::R8G8B8A8_SNORM;
case VK_FORMAT_R8G8B8A8_SSCALED:
return angle::FormatID::R8G8B8A8_SSCALED;
case VK_FORMAT_R8_SRGB:
return angle::FormatID::R8_UNORM_SRGB;
case VK_FORMAT_BC1_RGBA_SRGB_BLOCK:
return angle::FormatID::BC1_RGBA_UNORM_SRGB_BLOCK;
case VK_FORMAT_A1R5G5B5_UNORM_PACK16:
return angle::FormatID::A1R5G5B5_UNORM;
case VK_FORMAT_ASTC_10x10_SRGB_BLOCK:
return angle::FormatID::ASTC_10x10_SRGB_BLOCK;
case VK_FORMAT_A2B10G10R10_UNORM_PACK32:
return angle::FormatID::R10G10B10A2_UNORM;
case VK_FORMAT_ASTC_10x10_UNORM_BLOCK:
return angle::FormatID::ASTC_10x10_UNORM_BLOCK;
case VK_FORMAT_ASTC_10x5_SRGB_BLOCK:
return angle::FormatID::ASTC_10x5_SRGB_BLOCK;
case VK_FORMAT_ASTC_10x5_UNORM_BLOCK:
return angle::FormatID::ASTC_10x5_UNORM_BLOCK;
case VK_FORMAT_ASTC_10x6_SRGB_BLOCK:
return angle::FormatID::ASTC_10x6_SRGB_BLOCK;
case VK_FORMAT_ASTC_10x6_UNORM_BLOCK:
return angle::FormatID::ASTC_10x6_UNORM_BLOCK;
case VK_FORMAT_ASTC_10x8_SRGB_BLOCK:
return angle::FormatID::ASTC_10x8_SRGB_BLOCK;
case VK_FORMAT_ASTC_10x8_UNORM_BLOCK:
return angle::FormatID::ASTC_10x8_UNORM_BLOCK;
case VK_FORMAT_ASTC_12x10_SRGB_BLOCK:
return angle::FormatID::ASTC_12x10_SRGB_BLOCK;
case VK_FORMAT_ASTC_12x10_UNORM_BLOCK:
return angle::FormatID::ASTC_12x10_UNORM_BLOCK;
case VK_FORMAT_ASTC_12x12_SRGB_BLOCK:
return angle::FormatID::ASTC_12x12_SRGB_BLOCK;
case VK_FORMAT_ASTC_12x12_UNORM_BLOCK:
return angle::FormatID::ASTC_12x12_UNORM_BLOCK;
case VK_FORMAT_ASTC_4x4_SRGB_BLOCK:
return angle::FormatID::ASTC_4x4_SRGB_BLOCK;
case VK_FORMAT_ASTC_4x4_UNORM_BLOCK:
return angle::FormatID::ASTC_4x4_UNORM_BLOCK;
case VK_FORMAT_ASTC_5x4_SRGB_BLOCK:
return angle::FormatID::ASTC_5x4_SRGB_BLOCK;
case VK_FORMAT_ASTC_8x5_UNORM_BLOCK:
return angle::FormatID::ASTC_8x5_UNORM_BLOCK;
case VK_FORMAT_R16G16B16A16_USCALED:
return angle::FormatID::R16G16B16A16_USCALED;
case VK_FORMAT_R8G8B8A8_SRGB:
return angle::FormatID::R8G8B8A8_UNORM_SRGB;
case VK_FORMAT_UNDEFINED:
return angle::FormatID::NONE;
case VK_FORMAT_R32G32_UINT:
return angle::FormatID::R32G32_UINT;
case VK_FORMAT_R16G16_SNORM:
return angle::FormatID::R16G16_SNORM;
case VK_FORMAT_R16_UNORM:
return angle::FormatID::R16_UNORM;
case VK_FORMAT_A2B10G10R10_SINT_PACK32:
return angle::FormatID::R10G10B10A2_SINT;
case VK_FORMAT_R16G16B16A16_SFLOAT:
return angle::FormatID::R16G16B16A16_FLOAT;
case VK_FORMAT_ASTC_5x4_UNORM_BLOCK:
return angle::FormatID::ASTC_5x4_UNORM_BLOCK;
case VK_FORMAT_ASTC_5x5_SRGB_BLOCK:
return angle::FormatID::ASTC_5x5_SRGB_BLOCK;
case VK_FORMAT_EAC_R11_SNORM_BLOCK:
return angle::FormatID::EAC_R11_SNORM_BLOCK;
case VK_FORMAT_ASTC_8x6_SRGB_BLOCK:
return angle::FormatID::ASTC_8x6_SRGB_BLOCK;
case VK_FORMAT_R8G8B8A8_USCALED:
return angle::FormatID::R8G8B8A8_USCALED;
case VK_FORMAT_ASTC_5x5_UNORM_BLOCK:
return angle::FormatID::ASTC_5x5_UNORM_BLOCK;
case VK_FORMAT_ASTC_6x5_SRGB_BLOCK:
return angle::FormatID::ASTC_6x5_SRGB_BLOCK;
case VK_FORMAT_ASTC_6x5_UNORM_BLOCK:
return angle::FormatID::ASTC_6x5_UNORM_BLOCK;
case VK_FORMAT_R8G8B8A8_UINT:
return angle::FormatID::R8G8B8A8_UINT;
case VK_FORMAT_ASTC_6x6_SRGB_BLOCK:
return angle::FormatID::ASTC_6x6_SRGB_BLOCK;
case VK_FORMAT_ASTC_6x6_UNORM_BLOCK:
return angle::FormatID::ASTC_6x6_UNORM_BLOCK;
case VK_FORMAT_ASTC_8x5_SRGB_BLOCK:
return angle::FormatID::ASTC_8x5_SRGB_BLOCK;
case VK_FORMAT_ASTC_8x5_UNORM_BLOCK:
return angle::FormatID::ASTC_8x5_UNORM_BLOCK;
case VK_FORMAT_ASTC_8x6_SRGB_BLOCK:
return angle::FormatID::ASTC_8x6_SRGB_BLOCK;
case VK_FORMAT_ASTC_8x6_UNORM_BLOCK:
return angle::FormatID::ASTC_8x6_UNORM_BLOCK;
case VK_FORMAT_ASTC_8x8_SRGB_BLOCK:
return angle::FormatID::ASTC_8x8_SRGB_BLOCK;
case VK_FORMAT_ASTC_8x8_UNORM_BLOCK:
return angle::FormatID::ASTC_8x8_UNORM_BLOCK;
case VK_FORMAT_A2R10G10B10_UNORM_PACK32:
return angle::FormatID::B10G10R10A2_UNORM;
case VK_FORMAT_B4G4R4A4_UNORM_PACK16:
return angle::FormatID::B4G4R4A4_UNORM;
case VK_FORMAT_B5G5R5A1_UNORM_PACK16:
return angle::FormatID::B5G5R5A1_UNORM;
case VK_FORMAT_B5G6R5_UNORM_PACK16:
return angle::FormatID::B5G6R5_UNORM;
case VK_FORMAT_B8G8R8A8_UNORM:
return angle::FormatID::B8G8R8A8_UNORM;
case VK_FORMAT_B8G8R8A8_SRGB:
return angle::FormatID::B8G8R8A8_UNORM_SRGB;
case VK_FORMAT_BC1_RGBA_UNORM_BLOCK:
return angle::FormatID::BC1_RGBA_UNORM_BLOCK;
case VK_FORMAT_BC1_RGBA_SRGB_BLOCK:
return angle::FormatID::BC1_RGBA_UNORM_SRGB_BLOCK;
case VK_FORMAT_BC1_RGB_UNORM_BLOCK:
return angle::FormatID::BC1_RGB_UNORM_BLOCK;
case VK_FORMAT_BC1_RGB_SRGB_BLOCK:
return angle::FormatID::BC1_RGB_UNORM_SRGB_BLOCK;
case VK_FORMAT_BC2_UNORM_BLOCK:
return angle::FormatID::BC2_RGBA_UNORM_BLOCK;
case VK_FORMAT_BC2_SRGB_BLOCK:
return angle::FormatID::BC2_RGBA_UNORM_SRGB_BLOCK;
case VK_FORMAT_BC3_UNORM_BLOCK:
return angle::FormatID::BC3_RGBA_UNORM_BLOCK;
case VK_FORMAT_BC3_SRGB_BLOCK:
return angle::FormatID::BC3_RGBA_UNORM_SRGB_BLOCK;
case VK_FORMAT_BC4_SNORM_BLOCK:
return angle::FormatID::BC4_RED_SNORM_BLOCK;
case VK_FORMAT_BC4_UNORM_BLOCK:
return angle::FormatID::BC4_RED_UNORM_BLOCK;
case VK_FORMAT_BC5_SNORM_BLOCK:
return angle::FormatID::BC5_RG_SNORM_BLOCK;
case VK_FORMAT_BC5_UNORM_BLOCK:
return angle::FormatID::BC5_RG_UNORM_BLOCK;
case VK_FORMAT_BC7_UNORM_BLOCK:
return angle::FormatID::BPTC_RGBA_UNORM_BLOCK;
case VK_FORMAT_BC6H_SFLOAT_BLOCK:
return angle::FormatID::BPTC_RGB_SIGNED_FLOAT_BLOCK;
case VK_FORMAT_BC6H_UFLOAT_BLOCK:
return angle::FormatID::BPTC_RGB_UNSIGNED_FLOAT_BLOCK;
case VK_FORMAT_BC7_SRGB_BLOCK:
return angle::FormatID::BPTC_SRGB_ALPHA_UNORM_BLOCK;
case VK_FORMAT_D16_UNORM:
return angle::FormatID::D16_UNORM;
case VK_FORMAT_D24_UNORM_S8_UINT:
return angle::FormatID::D24_UNORM_S8_UINT;
case VK_FORMAT_X8_D24_UNORM_PACK32:
return angle::FormatID::D24_UNORM_X8_UINT;
case VK_FORMAT_D32_SFLOAT:
return angle::FormatID::D32_FLOAT;
case VK_FORMAT_D32_SFLOAT_S8_UINT:
return angle::FormatID::D32_FLOAT_S8X24_UINT;
case VK_FORMAT_EAC_R11G11_SNORM_BLOCK:
return angle::FormatID::EAC_R11G11_SNORM_BLOCK;
case VK_FORMAT_EAC_R11G11_UNORM_BLOCK:
return angle::FormatID::EAC_R11G11_UNORM_BLOCK;
case VK_FORMAT_EAC_R11_SNORM_BLOCK:
return angle::FormatID::EAC_R11_SNORM_BLOCK;
case VK_FORMAT_EAC_R11_UNORM_BLOCK:
return angle::FormatID::EAC_R11_UNORM_BLOCK;
case VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:
return angle::FormatID::ETC2_R8G8B8A1_SRGB_BLOCK;
case VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:
return angle::FormatID::ETC2_R8G8B8A1_UNORM_BLOCK;
case VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:
return angle::FormatID::ETC2_R8G8B8A8_SRGB_BLOCK;
case VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:
return angle::FormatID::ETC2_R8G8B8A8_UNORM_BLOCK;
case VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:
return angle::FormatID::ETC2_R8G8B8_SRGB_BLOCK;
case VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:
return angle::FormatID::ETC2_R8G8B8_UNORM_BLOCK;
case VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:
return angle::FormatID::G8_B8R8_2PLANE_420_UNORM;
case VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:
return angle::FormatID::G8_B8_R8_3PLANE_420_UNORM;
case VK_FORMAT_UNDEFINED:
return angle::FormatID::NONE;
case VK_FORMAT_A2B10G10R10_SINT_PACK32:
return angle::FormatID::R10G10B10A2_SINT;
case VK_FORMAT_A2B10G10R10_SNORM_PACK32:
return angle::FormatID::R10G10B10A2_SNORM;
case VK_FORMAT_A2B10G10R10_SSCALED_PACK32:
return angle::FormatID::R10G10B10A2_SSCALED;
case VK_FORMAT_A2B10G10R10_UINT_PACK32:
return angle::FormatID::R10G10B10A2_UINT;
case VK_FORMAT_A2B10G10R10_UNORM_PACK32:
return angle::FormatID::R10G10B10A2_UNORM;
case VK_FORMAT_A2B10G10R10_USCALED_PACK32:
return angle::FormatID::R10G10B10A2_USCALED;
case VK_FORMAT_B10G11R11_UFLOAT_PACK32:
return angle::FormatID::R11G11B10_FLOAT;
case VK_FORMAT_R16G16B16A16_SFLOAT:
return angle::FormatID::R16G16B16A16_FLOAT;
case VK_FORMAT_R16G16B16A16_SINT:
return angle::FormatID::R16G16B16A16_SINT;
case VK_FORMAT_R16G16B16A16_SNORM:
return angle::FormatID::R16G16B16A16_SNORM;
case VK_FORMAT_R16G16B16A16_SSCALED:
return angle::FormatID::R16G16B16A16_SSCALED;
case VK_FORMAT_R16G16B16A16_UINT:
return angle::FormatID::R16G16B16A16_UINT;
case VK_FORMAT_R16G16B16A16_UNORM:
return angle::FormatID::R16G16B16A16_UNORM;
case VK_FORMAT_R16G16B16A16_USCALED:
return angle::FormatID::R16G16B16A16_USCALED;
case VK_FORMAT_R16G16B16_SFLOAT:
return angle::FormatID::R16G16B16_FLOAT;
case VK_FORMAT_R16G16B16_SINT:
return angle::FormatID::R16G16B16_SINT;
case VK_FORMAT_R16G16B16_SNORM:
return angle::FormatID::R16G16B16_SNORM;
case VK_FORMAT_R16G16B16_SSCALED:
return angle::FormatID::R16G16B16_SSCALED;
case VK_FORMAT_R16G16B16_UINT:
return angle::FormatID::R16G16B16_UINT;
case VK_FORMAT_R16G16B16_UNORM:
return angle::FormatID::R16G16B16_UNORM;
case VK_FORMAT_R16G16B16_USCALED:
return angle::FormatID::R16G16B16_USCALED;
case VK_FORMAT_R16G16_SFLOAT:
return angle::FormatID::R16G16_FLOAT;
case VK_FORMAT_R16G16_SINT:
return angle::FormatID::R16G16_SINT;
case VK_FORMAT_R16G16_SNORM:
return angle::FormatID::R16G16_SNORM;
case VK_FORMAT_R16G16_SSCALED:
return angle::FormatID::R16G16_SSCALED;
case VK_FORMAT_R16G16_UINT:
return angle::FormatID::R16G16_UINT;
case VK_FORMAT_R16G16_UNORM:
return angle::FormatID::R16G16_UNORM;
case VK_FORMAT_R16G16_USCALED:
return angle::FormatID::R16G16_USCALED;
case VK_FORMAT_R16_SFLOAT:
return angle::FormatID::R16_FLOAT;
case VK_FORMAT_R16_SINT:
return angle::FormatID::R16_SINT;
case VK_FORMAT_R16_SNORM:
return angle::FormatID::R16_SNORM;
case VK_FORMAT_R16_SSCALED:
return angle::FormatID::R16_SSCALED;
case VK_FORMAT_R16_UINT:
return angle::FormatID::R16_UINT;
case VK_FORMAT_R16_UNORM:
return angle::FormatID::R16_UNORM;
case VK_FORMAT_R16_USCALED:
return angle::FormatID::R16_USCALED;
case VK_FORMAT_R32G32B32A32_SFLOAT:
return angle::FormatID::R32G32B32A32_FLOAT;
case VK_FORMAT_R32G32B32A32_SINT:
return angle::FormatID::R32G32B32A32_SINT;
case VK_FORMAT_R32G32B32A32_UINT:
return angle::FormatID::R32G32B32A32_UINT;
case VK_FORMAT_R32G32B32_SFLOAT:
return angle::FormatID::R32G32B32_FLOAT;
case VK_FORMAT_R32G32B32_SINT:
return angle::FormatID::R32G32B32_SINT;
case VK_FORMAT_R32G32B32_UINT:
return angle::FormatID::R32G32B32_UINT;
case VK_FORMAT_R32G32_SFLOAT:
return angle::FormatID::R32G32_FLOAT;
case VK_FORMAT_R32G32_SINT:
return angle::FormatID::R32G32_SINT;
case VK_FORMAT_R32G32_UINT:
return angle::FormatID::R32G32_UINT;
case VK_FORMAT_R32_SFLOAT:
return angle::FormatID::R32_FLOAT;
case VK_FORMAT_R32_SINT:
return angle::FormatID::R32_SINT;
case VK_FORMAT_R32_UINT:
return angle::FormatID::R32_UINT;
case VK_FORMAT_R4G4B4A4_UNORM_PACK16:
return angle::FormatID::R4G4B4A4_UNORM;
case VK_FORMAT_R5G5B5A1_UNORM_PACK16:
return angle::FormatID::R5G5B5A1_UNORM;
case VK_FORMAT_R5G6B5_UNORM_PACK16:
return angle::FormatID::R5G6B5_UNORM;
case VK_FORMAT_R8G8B8A8_SINT:
return angle::FormatID::R8G8B8A8_SINT;
case VK_FORMAT_B8G8R8A8_UNORM:
return angle::FormatID::B8G8R8A8_UNORM;
case VK_FORMAT_R32G32B32A32_SFLOAT:
return angle::FormatID::R32G32B32A32_FLOAT;
case VK_FORMAT_R16G16B16_UNORM:
return angle::FormatID::R16G16B16_UNORM;
case VK_FORMAT_BC2_UNORM_BLOCK:
return angle::FormatID::BC2_RGBA_UNORM_BLOCK;
case VK_FORMAT_ASTC_12x12_UNORM_BLOCK:
return angle::FormatID::ASTC_12x12_UNORM_BLOCK;
case VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:
return angle::FormatID::ETC2_R8G8B8A8_SRGB_BLOCK;
case VK_FORMAT_A2B10G10R10_SNORM_PACK32:
return angle::FormatID::R10G10B10A2_SNORM;
case VK_FORMAT_R8G8B8A8_SNORM:
return angle::FormatID::R8G8B8A8_SNORM;
case VK_FORMAT_R8G8B8A8_SSCALED:
return angle::FormatID::R8G8B8A8_SSCALED;
case VK_FORMAT_R8G8B8A8_UINT:
return angle::FormatID::R8G8B8A8_UINT;
case VK_FORMAT_R8G8B8A8_UNORM:
return angle::FormatID::R8G8B8A8_UNORM;
case VK_FORMAT_ASTC_6x6_SRGB_BLOCK:
return angle::FormatID::ASTC_6x6_SRGB_BLOCK;
case VK_FORMAT_ASTC_10x10_UNORM_BLOCK:
return angle::FormatID::ASTC_10x10_UNORM_BLOCK;
case VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:
return angle::FormatID::ETC2_R8G8B8A1_SRGB_BLOCK;
case VK_FORMAT_R16G16B16_SSCALED:
return angle::FormatID::R16G16B16_SSCALED;
case VK_FORMAT_R16G16_UNORM:
return angle::FormatID::R16G16_UNORM;
case VK_FORMAT_D32_SFLOAT:
return angle::FormatID::D32_FLOAT;
case VK_FORMAT_R16G16B16A16_UNORM:
return angle::FormatID::R16G16B16A16_UNORM;
case VK_FORMAT_EAC_R11_UNORM_BLOCK:
return angle::FormatID::EAC_R11_UNORM_BLOCK;
case VK_FORMAT_R16G16B16A16_UINT:
return angle::FormatID::R16G16B16A16_UINT;
case VK_FORMAT_R16G16B16A16_SINT:
return angle::FormatID::R16G16B16A16_SINT;
case VK_FORMAT_BC7_UNORM_BLOCK:
return angle::FormatID::BPTC_RGBA_UNORM_BLOCK;
case VK_FORMAT_A1R5G5B5_UNORM_PACK16:
return angle::FormatID::A1R5G5B5_UNORM;
case VK_FORMAT_ASTC_8x6_UNORM_BLOCK:
return angle::FormatID::ASTC_8x6_UNORM_BLOCK;
case VK_FORMAT_EAC_R11G11_SNORM_BLOCK:
return angle::FormatID::EAC_R11G11_SNORM_BLOCK;
case VK_FORMAT_A2B10G10R10_SSCALED_PACK32:
return angle::FormatID::R10G10B10A2_SSCALED;
case VK_FORMAT_BC1_RGBA_UNORM_BLOCK:
return angle::FormatID::BC1_RGBA_UNORM_BLOCK;
case VK_FORMAT_R32G32_SINT:
return angle::FormatID::R32G32_SINT;
case VK_FORMAT_R32G32B32_SFLOAT:
return angle::FormatID::R32G32B32_FLOAT;
case VK_FORMAT_R8_UINT:
return angle::FormatID::R8_UINT;
case VK_FORMAT_ASTC_10x6_UNORM_BLOCK:
return angle::FormatID::ASTC_10x6_UNORM_BLOCK;
case VK_FORMAT_BC1_RGB_UNORM_BLOCK:
return angle::FormatID::BC1_RGB_UNORM_BLOCK;
case VK_FORMAT_R4G4B4A4_UNORM_PACK16:
return angle::FormatID::R4G4B4A4_UNORM;
case VK_FORMAT_BC1_RGB_SRGB_BLOCK:
return angle::FormatID::BC1_RGB_UNORM_SRGB_BLOCK;
case VK_FORMAT_BC6H_SFLOAT_BLOCK:
return angle::FormatID::BPTC_RGB_SIGNED_FLOAT_BLOCK;
case VK_FORMAT_A2B10G10R10_UINT_PACK32:
return angle::FormatID::R10G10B10A2_UINT;
case VK_FORMAT_ASTC_6x5_SRGB_BLOCK:
return angle::FormatID::ASTC_6x5_SRGB_BLOCK;
case VK_FORMAT_R16G16_SFLOAT:
return angle::FormatID::R16G16_FLOAT;
case VK_FORMAT_B5G6R5_UNORM_PACK16:
return angle::FormatID::B5G6R5_UNORM;
case VK_FORMAT_R32_SFLOAT:
return angle::FormatID::R32_FLOAT;
case VK_FORMAT_ASTC_12x12_SRGB_BLOCK:
return angle::FormatID::ASTC_12x12_SRGB_BLOCK;
case VK_FORMAT_ASTC_5x5_UNORM_BLOCK:
return angle::FormatID::ASTC_5x5_UNORM_BLOCK;
case VK_FORMAT_R8G8B8A8_SRGB:
return angle::FormatID::R8G8B8A8_UNORM_SRGB;
case VK_FORMAT_R8G8B8A8_USCALED:
return angle::FormatID::R8G8B8A8_USCALED;
case VK_FORMAT_R8G8B8_SINT:
return angle::FormatID::R8G8B8_SINT;
case VK_FORMAT_ASTC_8x8_UNORM_BLOCK:
return angle::FormatID::ASTC_8x8_UNORM_BLOCK;
case VK_FORMAT_R32_SINT:
return angle::FormatID::R32_SINT;
case VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:
return angle::FormatID::ETC2_R8G8B8A1_UNORM_BLOCK;
case VK_FORMAT_R16_SSCALED:
return angle::FormatID::R16_SSCALED;
case VK_FORMAT_ASTC_6x6_UNORM_BLOCK:
return angle::FormatID::ASTC_6x6_UNORM_BLOCK;
case VK_FORMAT_R8G8B8_SNORM:
return angle::FormatID::R8G8B8_SNORM;
case VK_FORMAT_R16_UINT:
return angle::FormatID::R16_UINT;
case VK_FORMAT_R8_UNORM:
return angle::FormatID::R8_UNORM;
case VK_FORMAT_R32G32_SFLOAT:
return angle::FormatID::R32G32_FLOAT;
case VK_FORMAT_BC5_SNORM_BLOCK:
return angle::FormatID::BC5_RG_SNORM_BLOCK;
case VK_FORMAT_R16G16B16A16_SNORM:
return angle::FormatID::R16G16B16A16_SNORM;
case VK_FORMAT_R8G8_UNORM:
return angle::FormatID::R8G8_UNORM;
case VK_FORMAT_ASTC_10x6_SRGB_BLOCK:
return angle::FormatID::ASTC_10x6_SRGB_BLOCK;
case VK_FORMAT_ASTC_10x5_UNORM_BLOCK:
return angle::FormatID::ASTC_10x5_UNORM_BLOCK;
case VK_FORMAT_A2R10G10B10_UNORM_PACK32:
return angle::FormatID::B10G10R10A2_UNORM;
case VK_FORMAT_BC2_SRGB_BLOCK:
return angle::FormatID::BC2_RGBA_UNORM_SRGB_BLOCK;
case VK_FORMAT_R32G32B32_SINT:
return angle::FormatID::R32G32B32_SINT;
case VK_FORMAT_A2B10G10R10_USCALED_PACK32:
return angle::FormatID::R10G10B10A2_USCALED;
case VK_FORMAT_R8G8_SINT:
return angle::FormatID::R8G8_SINT;
case VK_FORMAT_R16G16B16A16_SSCALED:
return angle::FormatID::R16G16B16A16_SSCALED;
case VK_FORMAT_ASTC_10x5_SRGB_BLOCK:
return angle::FormatID::ASTC_10x5_SRGB_BLOCK;
case VK_FORMAT_R8_SSCALED:
return angle::FormatID::R8_SSCALED;
case VK_FORMAT_R16G16B16_SFLOAT:
return angle::FormatID::R16G16B16_FLOAT;
case VK_FORMAT_R8_SNORM:
return angle::FormatID::R8_SNORM;
case VK_FORMAT_R16_SNORM:
return angle::FormatID::R16_SNORM;
case VK_FORMAT_X8_D24_UNORM_PACK32:
return angle::FormatID::D24_UNORM_X8_UINT;
case VK_FORMAT_R16G16_SINT:
return angle::FormatID::R16G16_SINT;
case VK_FORMAT_R16G16B16_SINT:
return angle::FormatID::R16G16B16_SINT;
case VK_FORMAT_R8G8_SSCALED:
return angle::FormatID::R8G8_SSCALED;
case VK_FORMAT_EAC_R11G11_UNORM_BLOCK:
return angle::FormatID::EAC_R11G11_UNORM_BLOCK;
case VK_FORMAT_ASTC_10x8_UNORM_BLOCK:
return angle::FormatID::ASTC_10x8_UNORM_BLOCK;
case VK_FORMAT_ASTC_4x4_SRGB_BLOCK:
return angle::FormatID::ASTC_4x4_SRGB_BLOCK;
case VK_FORMAT_R8G8_UINT:
return angle::FormatID::R8G8_UINT;
case VK_FORMAT_R5G5B5A1_UNORM_PACK16:
return angle::FormatID::R5G5B5A1_UNORM;
case VK_FORMAT_R8G8B8_SSCALED:
return angle::FormatID::R8G8B8_SSCALED;
case VK_FORMAT_R8G8B8_UINT:
return angle::FormatID::R8G8B8_UINT;
case VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:
return angle::FormatID::G8_B8_R8_3PLANE_420_UNORM;
case VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:
return angle::FormatID::ETC2_R8G8B8_UNORM_BLOCK;
case VK_FORMAT_R32_UINT:
return angle::FormatID::R32_UINT;
case VK_FORMAT_R8G8B8_SRGB:
return angle::FormatID::R8G8B8_UNORM_SRGB;
case VK_FORMAT_R8G8B8_USCALED:
return angle::FormatID::R8G8B8_USCALED;
case VK_FORMAT_R8G8_SINT:
return angle::FormatID::R8G8_SINT;
case VK_FORMAT_R8G8_SNORM:
return angle::FormatID::R8G8_SNORM;
case VK_FORMAT_R8G8_SSCALED:
return angle::FormatID::R8G8_SSCALED;
case VK_FORMAT_R8G8_UINT:
return angle::FormatID::R8G8_UINT;
case VK_FORMAT_R8G8_UNORM:
return angle::FormatID::R8G8_UNORM;
case VK_FORMAT_R8G8_USCALED:
return angle::FormatID::R8G8_USCALED;
case VK_FORMAT_R8_SINT:
return angle::FormatID::R8_SINT;
case VK_FORMAT_R8_SNORM:
return angle::FormatID::R8_SNORM;
case VK_FORMAT_R8_SSCALED:
return angle::FormatID::R8_SSCALED;
case VK_FORMAT_R8_UINT:
return angle::FormatID::R8_UINT;
case VK_FORMAT_R8_UNORM:
return angle::FormatID::R8_UNORM;
case VK_FORMAT_R8_SRGB:
return angle::FormatID::R8_UNORM_SRGB;
case VK_FORMAT_R8_USCALED:
return angle::FormatID::R8_USCALED;
case VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:
return angle::FormatID::R9G9B9E5_SHAREDEXP;
case VK_FORMAT_BC4_UNORM_BLOCK:
return angle::FormatID::BC4_RED_UNORM_BLOCK;
case VK_FORMAT_R32G32B32A32_UINT:
return angle::FormatID::R32G32B32A32_UINT;
case VK_FORMAT_BC7_SRGB_BLOCK:
return angle::FormatID::BPTC_SRGB_ALPHA_UNORM_BLOCK;
case VK_FORMAT_R16G16_USCALED:
return angle::FormatID::R16G16_USCALED;
case VK_FORMAT_S8_UINT:
return angle::FormatID::S8_UINT;
default:
return angle::FormatID::NONE;

View File

@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
#
# Copyright 2020 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
@@ -334,7 +334,7 @@ def main():
return 0
format_args = {
"script_name": __file__,
"script_name": os.path.basename(__file__),
"data_source_name": json_file,
}