Commit 14f8918c by Cody Northrop Committed by Commit Bot

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/+/2828979Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
parent 69a26def
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
"src/libANGLE/renderer/Format_table_autogen.cpp": "src/libANGLE/renderer/Format_table_autogen.cpp":
"969f821f7241fbc3df16864daeafa68e", "969f821f7241fbc3df16864daeafa68e",
"src/libANGLE/renderer/angle_format.py": "src/libANGLE/renderer/angle_format.py":
"e5ac2fcfbc930ac2e3f3d54effeafed9", "35b819b32d3259961da75f5c971baba4",
"src/libANGLE/renderer/angle_format_data.json": "src/libANGLE/renderer/angle_format_data.json":
"4b3b5d4beef95c282ba4f20fdc2b20ed", "4b3b5d4beef95c282ba4f20fdc2b20ed",
"src/libANGLE/renderer/angle_format_map.json": "src/libANGLE/renderer/angle_format_map.json":
"46b589fc0fc306b2f7c97ee7bb08baee", "46b589fc0fc306b2f7c97ee7bb08baee",
"src/libANGLE/renderer/gen_angle_format_table.py": "src/libANGLE/renderer/gen_angle_format_table.py":
"428255701f3a3a9630593ab110ca98c1" "70bdbceee30506d4b14bf52f2bbd8f2b"
} }
\ No newline at end of file
{ {
"src/libANGLE/renderer/angle_format.py": "src/libANGLE/renderer/angle_format.py":
"e5ac2fcfbc930ac2e3f3d54effeafed9", "35b819b32d3259961da75f5c971baba4",
"src/libANGLE/renderer/gen_load_functions_table.py": "src/libANGLE/renderer/gen_load_functions_table.py":
"bbc2f2cbce34313d7c06a3511eff5a1f", "c131c494e7e0b35b65a8a097b4b8e5ce",
"src/libANGLE/renderer/load_functions_data.json": "src/libANGLE/renderer/load_functions_data.json":
"912670e6835fbe5074533bbeba44ef02", "912670e6835fbe5074533bbeba44ef02",
"src/libANGLE/renderer/load_functions_table_autogen.cpp": "src/libANGLE/renderer/load_functions_table_autogen.cpp":
......
{ {
"src/compiler/generate_parser_tools.py": "src/compiler/generate_parser_tools.py":
"78362c0f409423550b6b22a88c0ca64b", "6a34ad911710a45e5644e9f79dfd2ce5",
"src/compiler/preprocessor/generate_parser.py": "src/compiler/preprocessor/generate_parser.py":
"cc871de99688a35bfe32ef501f965d5a", "cc871de99688a35bfe32ef501f965d5a",
"src/compiler/preprocessor/preprocessor.l": "src/compiler/preprocessor/preprocessor.l":
......
{ {
"src/compiler/generate_parser_tools.py": "src/compiler/generate_parser_tools.py":
"78362c0f409423550b6b22a88c0ca64b", "6a34ad911710a45e5644e9f79dfd2ce5",
"src/compiler/translator/generate_parser.py": "src/compiler/translator/generate_parser.py":
"566178ecdfae3a29803b3687fc518ebb", "566178ecdfae3a29803b3687fc518ebb",
"src/compiler/translator/glslang.l": "src/compiler/translator/glslang.l":
......
{ {
"src/libANGLE/renderer/angle_format.py": "src/libANGLE/renderer/angle_format.py":
"e5ac2fcfbc930ac2e3f3d54effeafed9", "35b819b32d3259961da75f5c971baba4",
"src/libANGLE/renderer/d3d/d3d11/gen_texture_format_table.py": "src/libANGLE/renderer/d3d/d3d11/gen_texture_format_table.py":
"8ad208de51aafef78452ae7f6cf8b340", "bbb56f0a35bb2506524654444c8210d3",
"src/libANGLE/renderer/d3d/d3d11/texture_format_data.json": "src/libANGLE/renderer/d3d/d3d11/texture_format_data.json":
"b491f92f2adadad269248eb17dee8821", "b491f92f2adadad269248eb17dee8821",
"src/libANGLE/renderer/d3d/d3d11/texture_format_map.json": "src/libANGLE/renderer/d3d/d3d11/texture_format_map.json":
......
{ {
"src/libANGLE/renderer/angle_format.py": "src/libANGLE/renderer/angle_format.py":
"e5ac2fcfbc930ac2e3f3d54effeafed9", "35b819b32d3259961da75f5c971baba4",
"src/libANGLE/renderer/angle_format_map.json": "src/libANGLE/renderer/angle_format_map.json":
"46b589fc0fc306b2f7c97ee7bb08baee", "46b589fc0fc306b2f7c97ee7bb08baee",
"src/libANGLE/renderer/dxgi_format_data.json": "src/libANGLE/renderer/dxgi_format_data.json":
...@@ -8,5 +8,5 @@ ...@@ -8,5 +8,5 @@
"src/libANGLE/renderer/dxgi_format_map_autogen.cpp": "src/libANGLE/renderer/dxgi_format_map_autogen.cpp":
"974308ca798476dfaa076fb864478310", "974308ca798476dfaa076fb864478310",
"src/libANGLE/renderer/gen_dxgi_format_table.py": "src/libANGLE/renderer/gen_dxgi_format_table.py":
"8540567c885f88cbac66b7dc96b2dc10" "317faa90fd375c39cc8fbefe897604b3"
} }
\ No newline at end of file
...@@ -4,5 +4,5 @@ ...@@ -4,5 +4,5 @@
"src/libANGLE/renderer/dxgi_support_table_autogen.cpp": "src/libANGLE/renderer/dxgi_support_table_autogen.cpp":
"220fadac8434f87259bc47c1473a309d", "220fadac8434f87259bc47c1473a309d",
"src/libANGLE/renderer/gen_dxgi_support_tables.py": "src/libANGLE/renderer/gen_dxgi_support_tables.py":
"c6a42175680fc5ac6fd62ba3c5e8a2f9" "7f015104b9124627d3e962972284e507"
} }
\ No newline at end of file
...@@ -4,5 +4,5 @@ ...@@ -4,5 +4,5 @@
"src/compiler/translator/emulated_builtin_functions_hlsl_autogen.cpp": "src/compiler/translator/emulated_builtin_functions_hlsl_autogen.cpp":
"eeb085d4abc08e7dd15a1db8807efed6", "eeb085d4abc08e7dd15a1db8807efed6",
"src/compiler/translator/gen_emulated_builtin_function_tables.py": "src/compiler/translator/gen_emulated_builtin_function_tables.py":
"6e8fce6e03e32cf3b6a7350865621bdb" "0150347bc316e7c3772a7c1492c588b8"
} }
\ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"src/libANGLE/es3_copy_conversion_table_autogen.cpp": "src/libANGLE/es3_copy_conversion_table_autogen.cpp":
"c8418c317a331e54a6913c407e47aafb", "c8418c317a331e54a6913c407e47aafb",
"src/libANGLE/gen_copy_conversion_table.py": "src/libANGLE/gen_copy_conversion_table.py":
"52b879061499e456a3469da3d452f6c5", "0a73b7580342b9e27d4c71ade3af55e5",
"src/libANGLE/renderer/angle_format.py": "src/libANGLE/renderer/angle_format.py":
"e5ac2fcfbc930ac2e3f3d54effeafed9" "35b819b32d3259961da75f5c971baba4"
} }
\ No newline at end of file
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
"src/libANGLE/es3_format_type_combinations.json": "src/libANGLE/es3_format_type_combinations.json":
"b7d0c224864b87afd09a557a0099c2bb", "b7d0c224864b87afd09a557a0099c2bb",
"src/libANGLE/format_map_autogen.cpp": "src/libANGLE/format_map_autogen.cpp":
"18a0f3e044cfefb36cbbdfec6b4b1654", "b71c162b72facbbe89d2366b5e7cc4bf",
"src/libANGLE/format_map_data.json": "src/libANGLE/format_map_data.json":
"2e5db33b6d6b142b569123f614f3ddb7", "2e5db33b6d6b142b569123f614f3ddb7",
"src/libANGLE/gen_format_map.py": "src/libANGLE/gen_format_map.py":
"4062c6247b9c81ab3e8e6422fbd55349", "2421e2cfb4e074ae3fa6baa031c6394e",
"src/libANGLE/renderer/angle_format.py": "src/libANGLE/renderer/angle_format.py":
"e5ac2fcfbc930ac2e3f3d54effeafed9" "35b819b32d3259961da75f5c971baba4"
} }
\ No newline at end of file
{ {
"src/libANGLE/renderer/angle_format.py": "src/libANGLE/renderer/angle_format.py":
"e5ac2fcfbc930ac2e3f3d54effeafed9", "35b819b32d3259961da75f5c971baba4",
"src/libANGLE/renderer/angle_format_map.json": "src/libANGLE/renderer/angle_format_map.json":
"46b589fc0fc306b2f7c97ee7bb08baee", "46b589fc0fc306b2f7c97ee7bb08baee",
"src/libANGLE/renderer/gen_angle_format_table.py": "src/libANGLE/renderer/gen_angle_format_table.py":
"428255701f3a3a9630593ab110ca98c1", "70bdbceee30506d4b14bf52f2bbd8f2b",
"src/libANGLE/renderer/metal/shaders/blit.metal": "src/libANGLE/renderer/metal/shaders/blit.metal":
"2f6286729703039d41d0f6a109a23ac2", "2f6286729703039d41d0f6a109a23ac2",
"src/libANGLE/renderer/metal/shaders/clear.metal": "src/libANGLE/renderer/metal/shaders/clear.metal":
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
"src/libANGLE/renderer/metal/shaders/gen_mipmap.metal": "src/libANGLE/renderer/metal/shaders/gen_mipmap.metal":
"54dca94c48bead446624079070b9b309", "54dca94c48bead446624079070b9b309",
"src/libANGLE/renderer/metal/shaders/gen_mtl_internal_shaders.py": "src/libANGLE/renderer/metal/shaders/gen_mtl_internal_shaders.py":
"af7a98ffaa3f3885b1e3cc7160c8549b", "ba74ebbfa2ceb825f36e84f2985b3d3d",
"src/libANGLE/renderer/metal/shaders/mtl_default_shaders_src_autogen.inc": "src/libANGLE/renderer/metal/shaders/mtl_default_shaders_src_autogen.inc":
"94260983944013d7b094aaab74f37a17", "94260983944013d7b094aaab74f37a17",
"src/libANGLE/renderer/metal/shaders/visibility.metal": "src/libANGLE/renderer/metal/shaders/visibility.metal":
......
{ {
"src/libANGLE/renderer/angle_format.py": "src/libANGLE/renderer/angle_format.py":
"e5ac2fcfbc930ac2e3f3d54effeafed9", "35b819b32d3259961da75f5c971baba4",
"src/libANGLE/renderer/angle_format_map.json": "src/libANGLE/renderer/angle_format_map.json":
"46b589fc0fc306b2f7c97ee7bb08baee", "46b589fc0fc306b2f7c97ee7bb08baee",
"src/libANGLE/renderer/metal/gen_mtl_format_table.py": "src/libANGLE/renderer/metal/gen_mtl_format_table.py":
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
"scripts/gl.xml": "scripts/gl.xml":
"2a73a58a7e26d8676a2c0af6d528cae6", "2a73a58a7e26d8676a2c0af6d528cae6",
"src/libANGLE/renderer/angle_format.py": "src/libANGLE/renderer/angle_format.py":
"e5ac2fcfbc930ac2e3f3d54effeafed9", "35b819b32d3259961da75f5c971baba4",
"src/libANGLE/renderer/gl/DispatchTableGL_autogen.cpp": "src/libANGLE/renderer/gl/DispatchTableGL_autogen.cpp":
"54a5c8b87d54114ee61a4c535931ea48", "54a5c8b87d54114ee61a4c535931ea48",
"src/libANGLE/renderer/gl/DispatchTableGL_autogen.h": "src/libANGLE/renderer/gl/DispatchTableGL_autogen.h":
"e41b2685228feb5c20b5c1400837c055", "e41b2685228feb5c20b5c1400837c055",
"src/libANGLE/renderer/gl/generate_gl_dispatch_table.py": "src/libANGLE/renderer/gl/generate_gl_dispatch_table.py":
"30e1c2d60a3f81bcc354dcad5a8d9ec2", "d133c757b44279ad205183c9c9c9b598",
"src/libANGLE/renderer/gl/gl_bindings_data.json": "src/libANGLE/renderer/gl/gl_bindings_data.json":
"6f46f537e07b457850c060ef0c7b76c5", "6f46f537e07b457850c060ef0c7b76c5",
"src/libANGLE/renderer/gl/null_functions.cpp": "src/libANGLE/renderer/gl/null_functions.cpp":
......
{ {
"src/libANGLE/renderer/angle_format.py": "src/libANGLE/renderer/angle_format.py":
"e5ac2fcfbc930ac2e3f3d54effeafed9", "35b819b32d3259961da75f5c971baba4",
"src/libANGLE/renderer/angle_format_map.json": "src/libANGLE/renderer/angle_format_map.json":
"46b589fc0fc306b2f7c97ee7bb08baee", "46b589fc0fc306b2f7c97ee7bb08baee",
"src/libANGLE/renderer/vulkan/gen_vk_format_table.py": "src/libANGLE/renderer/vulkan/gen_vk_format_table.py":
"bcd28f46d41727b93943129edfeda12d", "ffeebc0e8ec8db860e472c7cf04cd880",
"src/libANGLE/renderer/vulkan/vk_format_map.json": "src/libANGLE/renderer/vulkan/vk_format_map.json":
"3b4563c98576280cbe4bcb9af4aafdde", "3b4563c98576280cbe4bcb9af4aafdde",
"src/libANGLE/renderer/vulkan/vk_format_table_autogen.cpp": "src/libANGLE/renderer/vulkan/vk_format_table_autogen.cpp":
"c5e18754528e417628eb72186b8465ce" "459f920b945c11152539e9241de46a95"
} }
\ No newline at end of file
{ {
"src/libANGLE/renderer/angle_format.py": "src/libANGLE/renderer/angle_format.py":
"e5ac2fcfbc930ac2e3f3d54effeafed9", "35b819b32d3259961da75f5c971baba4",
"src/libANGLE/renderer/vulkan/gen_vk_mandatory_format_support_table.py": "src/libANGLE/renderer/vulkan/gen_vk_mandatory_format_support_table.py":
"3e2b8cd80373275e862bb7c8ba20a745", "3e2b8cd80373275e862bb7c8ba20a745",
"src/libANGLE/renderer/vulkan/vk_format_map.json": "src/libANGLE/renderer/vulkan/vk_format_map.json":
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"src/tests/restricted_traces/.gitignore": "src/tests/restricted_traces/.gitignore":
"9e34de23403add0a73d889d998971292", "9e34de23403add0a73d889d998971292",
"src/tests/restricted_traces/gen_restricted_traces.py": "src/tests/restricted_traces/gen_restricted_traces.py":
"7cc5d772c8e18a58224ab4436fc3a205", "f700505c2ba8299a6ce68962763d7f2d",
"src/tests/restricted_traces/restricted_traces.json": "src/tests/restricted_traces/restricted_traces.json":
"1ba9185b74b0c64bcbd98226219f0e3c", "1ba9185b74b0c64bcbd98226219f0e3c",
"src/tests/restricted_traces/restricted_traces_autogen.cpp": "src/tests/restricted_traces/restricted_traces_autogen.cpp":
......
{ {
"src/common/gen_uniform_type_table.py": "src/common/gen_uniform_type_table.py":
"714cdb13f7c30af4890922a856456ddb", "f57829d5e5b97ac1dcb8a95316736de9",
"src/common/uniform_type_info_autogen.cpp": "src/common/uniform_type_info_autogen.cpp":
"85b351f2d5525d1af422a880e361a2bd" "85b351f2d5525d1af422a880e361a2bd"
} }
\ No newline at end of file
#!/usr/bin/python #!/usr/bin/python3
# Copyright 2017 The ANGLE Project Authors. All rights reserved. # Copyright 2017 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
...@@ -255,9 +255,9 @@ def main(): ...@@ -255,9 +255,9 @@ def main():
outputs = ['uniform_type_info_autogen.cpp'] outputs = ['uniform_type_info_autogen.cpp']
if sys.argv[1] == 'inputs': if sys.argv[1] == 'inputs':
print ','.join(inputs) print(','.join(inputs))
elif sys.argv[1] == 'outputs': elif sys.argv[1] == 'outputs':
print ','.join(outputs) print(','.join(outputs))
else: else:
print('Invalid script parameters') print('Invalid script parameters')
return 1 return 1
......
#!/usr/bin/python #!/usr/bin/python3
# Copyright 2019 The ANGLE Project Authors. All rights reserved. # Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
...@@ -148,12 +148,12 @@ def generate_parser(basename, generate_header): ...@@ -148,12 +148,12 @@ def generate_parser(basename, generate_header):
# Call flex and bison to generate the lexer and parser. # Call flex and bison to generate the lexer and parser.
flex_result = run_flex(basename) flex_result = run_flex(basename)
if flex_result != 0: 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 return 1
bison_result = run_bison(basename, generate_header) bison_result = run_bison(basename, generate_header)
if bison_result != 0: 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 2
return 0 return 0
#!/usr/bin/python #!/usr/bin/python3
# Copyright 2017 The ANGLE Project Authors. All rights reserved. # Copyright 2017 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
...@@ -122,9 +122,9 @@ def main(): ...@@ -122,9 +122,9 @@ def main():
outputs = [hlsl_fname] outputs = [hlsl_fname]
if sys.argv[1] == 'inputs': if sys.argv[1] == 'inputs':
print ','.join(inputs) print(','.join(inputs))
elif sys.argv[1] == 'outputs': elif sys.argv[1] == 'outputs':
print ','.join(outputs) print(','.join(outputs))
else: else:
print('Invalid script parameters') print('Invalid script parameters')
return 1 return 1
......
...@@ -652,36 +652,39 @@ bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat ...@@ -652,36 +652,39 @@ bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat
switch (format) switch (format)
{ {
case GL_RGB_INTEGER: case GL_ALPHA:
switch (type) switch (type)
{ {
case GL_INT: case GL_FLOAT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGB32I: case GL_ALPHA:
case GL_ALPHA32F_EXT:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_UNSIGNED_SHORT: case GL_HALF_FLOAT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGB16UI: case GL_ALPHA:
case GL_ALPHA16F_EXT:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_SHORT: case GL_HALF_FLOAT_OES:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGB16I: case GL_ALPHA:
case GL_ALPHA16F_EXT:
return true; return true;
default: default:
break; break;
...@@ -692,114 +695,138 @@ bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat ...@@ -692,114 +695,138 @@ bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGB8UI: case GL_ALPHA:
case GL_ALPHA8_EXT:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_BYTE: default:
break;
}
break;
case GL_BGRA_EXT:
switch (type)
{
case GL_UNSIGNED_BYTE:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGB8I: case GL_BGRA_EXT:
case GL_BGRA8_EXT:
case GL_BGRA4_ANGLEX:
case GL_BGR5_A1_ANGLEX:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_UNSIGNED_INT: case GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGB32UI: case GL_BGR5_A1_ANGLEX:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
default: case GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT:
break;
}
break;
case GL_RGBA_INTEGER:
switch (type)
{
case GL_INT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGBA32I: case GL_BGRA4_ANGLEX:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_UNSIGNED_SHORT: default:
break;
}
break;
case GL_DEPTH_COMPONENT:
switch (type)
{
case GL_FLOAT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGBA16UI: case GL_DEPTH_COMPONENT32F:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_UNSIGNED_INT_2_10_10_10_REV: case GL_UNSIGNED_INT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGB10_A2UI: case GL_DEPTH_COMPONENT24:
case GL_DEPTH_COMPONENT16:
case GL_DEPTH_COMPONENT:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_SHORT: case GL_UNSIGNED_INT_24_8:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGBA16I: case GL_DEPTH_COMPONENT32_OES:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_UNSIGNED_BYTE: case GL_UNSIGNED_SHORT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGBA8UI: case GL_DEPTH_COMPONENT16:
case GL_DEPTH_COMPONENT:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_BYTE: default:
break;
}
break;
case GL_DEPTH_STENCIL:
switch (type)
{
case GL_FLOAT_32_UNSIGNED_INT_24_8_REV:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGBA8I: case GL_DEPTH32F_STENCIL8:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_UNSIGNED_INT: case GL_UNSIGNED_INT_24_8:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGBA32UI: case GL_DEPTH_STENCIL:
case GL_DEPTH24_STENCIL8:
return true; return true;
default: default:
break; break;
...@@ -811,74 +838,83 @@ bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat ...@@ -811,74 +838,83 @@ bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat
} }
break; break;
case GL_RGB: case GL_LUMINANCE:
switch (type) switch (type)
{ {
case GL_UNSIGNED_INT_10F_11F_11F_REV: case GL_FLOAT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_R11F_G11F_B10F: case GL_LUMINANCE:
case GL_LUMINANCE32F_EXT:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_UNSIGNED_SHORT: case GL_HALF_FLOAT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGB16_EXT: case GL_LUMINANCE:
case GL_LUMINANCE16F_EXT:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_UNSIGNED_INT_2_10_10_10_REV: case GL_HALF_FLOAT_OES:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGB: case GL_LUMINANCE:
case GL_LUMINANCE16F_EXT:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_SHORT: case GL_UNSIGNED_BYTE:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGB16_SNORM_EXT: case GL_LUMINANCE:
case GL_LUMINANCE8_EXT:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
default:
break;
}
break;
case GL_LUMINANCE_ALPHA:
switch (type)
{
case GL_FLOAT: case GL_FLOAT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGB: case GL_LUMINANCE_ALPHA:
case GL_RGB32F: case GL_LUMINANCE_ALPHA32F_EXT:
case GL_RGB16F:
case GL_R11F_G11F_B10F:
case GL_RGB9_E5:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_UNSIGNED_SHORT_5_6_5: case GL_HALF_FLOAT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGB: case GL_LUMINANCE_ALPHA:
case GL_RGB565: case GL_LUMINANCE_ALPHA16F_EXT:
return true; return true;
default: default:
break; break;
...@@ -889,115 +925,111 @@ bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat ...@@ -889,115 +925,111 @@ bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGB: case GL_LUMINANCE_ALPHA:
case GL_RGB16F: case GL_LUMINANCE_ALPHA16F_EXT:
case GL_R11F_G11F_B10F:
case GL_RGB9_E5:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_HALF_FLOAT: case GL_UNSIGNED_BYTE:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGB16F: case GL_LUMINANCE_ALPHA:
case GL_R11F_G11F_B10F: case GL_LUMINANCE8_ALPHA8_EXT:
case GL_RGB9_E5:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_UNSIGNED_BYTE: default:
break;
}
break;
case GL_RED:
switch (type)
{
case GL_BYTE:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGB: case GL_R8_SNORM:
case GL_RGB8:
case GL_RGB565:
case GL_SRGB8:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_BYTE: case GL_FLOAT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGB8_SNORM: case GL_R32F:
case GL_R16F:
case GL_RED:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_UNSIGNED_INT_5_9_9_9_REV: case GL_HALF_FLOAT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGB9_E5: case GL_R16F:
case GL_RED:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
default: case GL_HALF_FLOAT_OES:
break;
}
break;
case GL_LUMINANCE_ALPHA:
switch (type)
{
case GL_HALF_FLOAT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_LUMINANCE_ALPHA16F_EXT: case GL_R16F:
case GL_LUMINANCE_ALPHA: case GL_RED:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_UNSIGNED_BYTE: case GL_SHORT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_LUMINANCE_ALPHA: case GL_R16_SNORM_EXT:
case GL_LUMINANCE8_ALPHA8_EXT:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_FLOAT: case GL_UNSIGNED_BYTE:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_LUMINANCE_ALPHA: case GL_R8:
case GL_LUMINANCE_ALPHA32F_EXT: case GL_RED:
case GL_SR8_EXT:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_HALF_FLOAT_OES: case GL_UNSIGNED_SHORT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_LUMINANCE_ALPHA16F_EXT: case GL_R16_EXT:
case GL_LUMINANCE_ALPHA:
return true; return true;
default: default:
break; break;
...@@ -1009,15 +1041,36 @@ bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat ...@@ -1009,15 +1041,36 @@ bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat
} }
break; break;
case GL_ALPHA: case GL_RED_INTEGER:
switch (type) switch (type)
{ {
case GL_HALF_FLOAT: case GL_BYTE:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_ALPHA16F_EXT: case GL_R8I:
case GL_ALPHA: return true;
default:
break;
}
break;
}
case GL_INT:
{
switch (internalFormat)
{
case GL_R32I:
return true;
default:
break;
}
break;
}
case GL_SHORT:
{
switch (internalFormat)
{
case GL_R16I:
return true; return true;
default: default:
break; break;
...@@ -1028,32 +1081,29 @@ bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat ...@@ -1028,32 +1081,29 @@ bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_ALPHA: case GL_R8UI:
case GL_ALPHA8_EXT:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_FLOAT: case GL_UNSIGNED_INT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_ALPHA: case GL_R32UI:
case GL_ALPHA32F_EXT:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_HALF_FLOAT_OES: case GL_UNSIGNED_SHORT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_ALPHA16F_EXT: case GL_R16UI:
case GL_ALPHA:
return true; return true;
default: default:
break; break;
...@@ -1065,284 +1115,282 @@ bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat ...@@ -1065,284 +1115,282 @@ bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat
} }
break; break;
case GL_RGBA: case GL_RG:
switch (type) switch (type)
{ {
case GL_UNSIGNED_SHORT: case GL_BYTE:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGBA16_EXT: case GL_RG8_SNORM:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_UNSIGNED_INT_2_10_10_10_REV: case GL_FLOAT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGBA: case GL_RG32F:
case GL_RGB10_A2: case GL_RG16F:
case GL_RGB5_A1: case GL_RG:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_SHORT: case GL_HALF_FLOAT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGBA16_SNORM_EXT: case GL_RG16F:
case GL_RG:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_UNSIGNED_SHORT_4_4_4_4: case GL_HALF_FLOAT_OES:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGBA: case GL_RG16F:
case GL_RGBA4: case GL_RG:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_FLOAT: case GL_SHORT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGBA: case GL_RG16_SNORM_EXT:
case GL_RGBA32F:
case GL_RGBA16F:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_HALF_FLOAT_OES: case GL_UNSIGNED_BYTE:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGBA: case GL_RG8:
case GL_RGBA16F: case GL_RG:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_HALF_FLOAT: case GL_UNSIGNED_SHORT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGBA16F: case GL_RG16_EXT:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_UNSIGNED_BYTE: default:
break;
}
break;
case GL_RGB:
switch (type)
{
case GL_BYTE:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGBA: case GL_RGB8_SNORM:
case GL_RGBA8:
case GL_RGB5_A1:
case GL_RGBA4:
case GL_SRGB8_ALPHA8:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_BYTE: case GL_FLOAT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGBA8_SNORM: case GL_RGB32F:
case GL_RGB16F:
case GL_R11F_G11F_B10F:
case GL_RGB9_E5:
case GL_RGB:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_UNSIGNED_SHORT_5_5_5_1: case GL_HALF_FLOAT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RGBA: case GL_RGB16F:
case GL_RGB5_A1: case GL_R11F_G11F_B10F:
case GL_RGB9_E5:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
default: case GL_HALF_FLOAT_OES:
break;
}
break;
case GL_LUMINANCE:
switch (type)
{
case GL_HALF_FLOAT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_LUMINANCE16F_EXT: case GL_RGB16F:
case GL_LUMINANCE: case GL_R11F_G11F_B10F:
case GL_RGB9_E5:
case GL_RGB:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_UNSIGNED_BYTE: case GL_SHORT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_LUMINANCE: case GL_RGB16_SNORM_EXT:
case GL_LUMINANCE8_EXT:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_FLOAT: case GL_UNSIGNED_BYTE:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_LUMINANCE: case GL_RGB8:
case GL_LUMINANCE32F_EXT: case GL_RGB565:
case GL_SRGB8:
case GL_RGB:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_HALF_FLOAT_OES: case GL_UNSIGNED_INT_10F_11F_11F_REV:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_LUMINANCE16F_EXT: case GL_R11F_G11F_B10F:
case GL_LUMINANCE:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
default: case GL_UNSIGNED_INT_2_10_10_10_REV:
break;
}
break;
case GL_RG_INTEGER:
switch (type)
{
case GL_INT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RG32I: case GL_RGB:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_UNSIGNED_SHORT: case GL_UNSIGNED_INT_5_9_9_9_REV:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RG16UI: case GL_RGB9_E5:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_SHORT: case GL_UNSIGNED_SHORT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RG16I: case GL_RGB16_EXT:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_UNSIGNED_BYTE: case GL_UNSIGNED_SHORT_5_6_5:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RG8UI: case GL_RGB565:
case GL_RGB:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
default:
break;
}
break;
case GL_RGBA:
switch (type)
{
case GL_BYTE: case GL_BYTE:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RG8I: case GL_RGBA8_SNORM:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_UNSIGNED_INT: case GL_FLOAT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RG32UI: case GL_RGBA32F:
case GL_RGBA16F:
case GL_RGBA:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
default: case GL_HALF_FLOAT:
break;
}
break;
case GL_RED_INTEGER:
switch (type)
{
case GL_INT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_R32I: case GL_RGBA16F:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_UNSIGNED_SHORT: case GL_HALF_FLOAT_OES:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_R16UI: case GL_RGBA16F:
case GL_RGBA:
return true; return true;
default: default:
break; break;
...@@ -1353,7 +1401,7 @@ bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat ...@@ -1353,7 +1401,7 @@ bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_R16I: case GL_RGBA16_SNORM_EXT:
return true; return true;
default: default:
break; break;
...@@ -1364,60 +1412,59 @@ bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat ...@@ -1364,60 +1412,59 @@ bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_R8UI: case GL_RGBA8:
case GL_RGB5_A1:
case GL_RGBA4:
case GL_SRGB8_ALPHA8:
case GL_RGBA:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_BYTE: case GL_UNSIGNED_INT_2_10_10_10_REV:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_R8I: case GL_RGB10_A2:
case GL_RGB5_A1:
case GL_RGBA:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_UNSIGNED_INT: case GL_UNSIGNED_SHORT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_R32UI: case GL_RGBA16_EXT:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
default: case GL_UNSIGNED_SHORT_4_4_4_4:
break;
}
break;
case GL_DEPTH_STENCIL:
switch (type)
{
case GL_UNSIGNED_INT_24_8:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_DEPTH_STENCIL: case GL_RGBA4:
case GL_DEPTH24_STENCIL8: case GL_RGBA:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_FLOAT_32_UNSIGNED_INT_24_8_REV: case GL_UNSIGNED_SHORT_5_5_5_1:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_DEPTH32F_STENCIL8: case GL_RGB5_A1:
case GL_RGBA:
return true; return true;
default: default:
break; break;
...@@ -1429,86 +1476,80 @@ bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat ...@@ -1429,86 +1476,80 @@ bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat
} }
break; break;
case GL_RED: case GL_RGBA_INTEGER:
switch (type) switch (type)
{ {
case GL_UNSIGNED_SHORT: case GL_BYTE:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_R16_EXT: case GL_RGBA8I:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_SHORT: case GL_INT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_R16_SNORM_EXT: case GL_RGBA32I:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_FLOAT: case GL_SHORT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RED: case GL_RGBA16I:
case GL_R32F:
case GL_R16F:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_HALF_FLOAT_OES: case GL_UNSIGNED_BYTE:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RED: case GL_RGBA8UI:
case GL_R16F:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_HALF_FLOAT: case GL_UNSIGNED_INT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RED: case GL_RGBA32UI:
case GL_R16F:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_UNSIGNED_BYTE: case GL_UNSIGNED_INT_2_10_10_10_REV:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RED: case GL_RGB10_A2UI:
case GL_SR8_EXT:
case GL_R8:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_BYTE: case GL_UNSIGNED_SHORT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_R8_SNORM: case GL_RGBA16UI:
return true; return true;
default: default:
break; break;
...@@ -1520,89 +1561,69 @@ bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat ...@@ -1520,89 +1561,69 @@ bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat
} }
break; break;
case GL_DEPTH_COMPONENT: case GL_RGB_INTEGER:
switch (type) switch (type)
{ {
case GL_UNSIGNED_INT: case GL_BYTE:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_DEPTH_COMPONENT: case GL_RGB8I:
case GL_DEPTH_COMPONENT24:
case GL_DEPTH_COMPONENT16:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_UNSIGNED_INT_24_8: case GL_INT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_DEPTH_COMPONENT32_OES: case GL_RGB32I:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_FLOAT: case GL_SHORT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_DEPTH_COMPONENT32F: case GL_RGB16I:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_UNSIGNED_SHORT: case GL_UNSIGNED_BYTE:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_DEPTH_COMPONENT: case GL_RGB8UI:
case GL_DEPTH_COMPONENT16:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
default: case GL_UNSIGNED_INT:
break;
}
break;
case GL_STENCIL_INDEX:
switch (type)
{
case GL_UNSIGNED_BYTE:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_STENCIL_INDEX8: case GL_RGB32UI:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
default: case GL_UNSIGNED_SHORT:
break;
}
break;
case GL_SRGB_EXT:
switch (type)
{
case GL_UNSIGNED_BYTE:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_SRGB_EXT: case GL_RGB16UI:
case GL_SRGB8:
return true; return true;
default: default:
break; break;
...@@ -1614,34 +1635,25 @@ bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat ...@@ -1614,34 +1635,25 @@ bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat
} }
break; break;
case GL_SRGB_ALPHA_EXT: case GL_RG_INTEGER:
switch (type) switch (type)
{ {
case GL_UNSIGNED_BYTE: case GL_BYTE:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_SRGB_ALPHA_EXT: case GL_RG8I:
case GL_SRGB8_ALPHA8_EXT:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
default: case GL_INT:
break;
}
break;
case GL_RG:
switch (type)
{
case GL_UNSIGNED_SHORT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RG16_EXT: case GL_RG32I:
return true; return true;
default: default:
break; break;
...@@ -1652,67 +1664,60 @@ bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat ...@@ -1652,67 +1664,60 @@ bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RG16_SNORM_EXT: case GL_RG16I:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_FLOAT: case GL_UNSIGNED_BYTE:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RG: case GL_RG8UI:
case GL_RG32F:
case GL_RG16F:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_HALF_FLOAT_OES: case GL_UNSIGNED_INT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RG: case GL_RG32UI:
case GL_RG16F:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_HALF_FLOAT: case GL_UNSIGNED_SHORT:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RG: case GL_RG16UI:
case GL_RG16F:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_UNSIGNED_BYTE: default:
{
switch (internalFormat)
{
case GL_RG:
case GL_RG8:
return true;
default:
break;
}
break; break;
} }
case GL_BYTE: break;
case GL_SRGB_ALPHA_EXT:
switch (type)
{
case GL_UNSIGNED_BYTE:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_RG8_SNORM: case GL_SRGB_ALPHA_EXT:
case GL_SRGB8_ALPHA8_EXT:
return true; return true;
default: default:
break; break;
...@@ -1724,39 +1729,34 @@ bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat ...@@ -1724,39 +1729,34 @@ bool ValidES3FormatCombination(GLenum format, GLenum type, GLenum internalFormat
} }
break; break;
case GL_BGRA_EXT: case GL_SRGB_EXT:
switch (type) switch (type)
{ {
case GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT:
{
switch (internalFormat)
{
case GL_BGRA4_ANGLEX:
return true;
default:
break;
}
break;
}
case GL_UNSIGNED_BYTE: case GL_UNSIGNED_BYTE:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_BGRA8_EXT: case GL_SRGB_EXT:
case GL_BGRA4_ANGLEX: case GL_SRGB8:
case GL_BGR5_A1_ANGLEX:
case GL_BGRA_EXT:
return true; return true;
default: default:
break; break;
} }
break; break;
} }
case GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT: default:
break;
}
break;
case GL_STENCIL_INDEX:
switch (type)
{
case GL_UNSIGNED_BYTE:
{ {
switch (internalFormat) switch (internalFormat)
{ {
case GL_BGR5_A1_ANGLEX: case GL_STENCIL_INDEX8:
return true; return true;
default: default:
break; break;
......
#!/usr/bin/python #!/usr/bin/python3
# Copyright 2016 The ANGLE Project Authors. All rights reserved. # Copyright 2016 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
...@@ -77,9 +77,9 @@ def main(): ...@@ -77,9 +77,9 @@ def main():
outputs = [out_file_name] outputs = [out_file_name]
if sys.argv[1] == 'inputs': if sys.argv[1] == 'inputs':
print ','.join(inputs) print(','.join(inputs))
elif sys.argv[1] == 'outputs': elif sys.argv[1] == 'outputs':
print ','.join(outputs) print(','.join(outputs))
else: else:
print('Invalid script parameters') print('Invalid script parameters')
return 1 return 1
...@@ -89,7 +89,7 @@ def main(): ...@@ -89,7 +89,7 @@ def main():
format_map = {} format_map = {}
for description, data in json_data.iteritems(): for description, data in sorted(json_data.items()):
for texture_format, framebuffer_format in data: for texture_format, framebuffer_format in data:
if texture_format not in format_map: if texture_format not in format_map:
format_map[texture_format] = [] format_map[texture_format] = []
...@@ -97,7 +97,7 @@ def main(): ...@@ -97,7 +97,7 @@ def main():
texture_format_cases = "" 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) texture_format_cases += parse_texture_format_case(texture_format, framebuffer_formats)
with open(out_file_name, 'wt') as out_file: with open(out_file_name, 'wt') as out_file:
......
#!/usr/bin/python #!/usr/bin/python3
# Copyright 2016 The ANGLE Project Authors. All rights reserved. # Copyright 2016 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
...@@ -117,7 +117,7 @@ def parse_type_case(type, result): ...@@ -117,7 +117,7 @@ def parse_type_case(type, result):
def parse_format_case(format, type_map): def parse_format_case(format, type_map):
type_cases = "" 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) type_cases += parse_type_case(type, internal_format)
return template_format_case.format(format=format, type_cases=type_cases) return template_format_case.format(format=format, type_cases=type_cases)
...@@ -132,9 +132,9 @@ def main(): ...@@ -132,9 +132,9 @@ def main():
outputs = ['format_map_autogen.cpp'] outputs = ['format_map_autogen.cpp']
if sys.argv[1] == 'inputs': if sys.argv[1] == 'inputs':
print ','.join(inputs) print(','.join(inputs))
elif sys.argv[1] == 'outputs': elif sys.argv[1] == 'outputs':
print ','.join(outputs) print(','.join(outputs))
else: else:
print('Invalid script parameters') print('Invalid script parameters')
return 1 return 1
...@@ -146,7 +146,7 @@ def main(): ...@@ -146,7 +146,7 @@ def main():
format_cases = "" 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) format_cases += parse_format_case(format, type_map)
combo_data_file = 'es3_format_type_combinations.json' combo_data_file = 'es3_format_type_combinations.json'
...@@ -179,9 +179,9 @@ def main(): ...@@ -179,9 +179,9 @@ def main():
es3_combo_cases = "" es3_combo_cases = ""
for format, type_combos in combos.iteritems(): for format, type_combos in sorted(combos.items()):
this_type_cases = "" this_type_cases = ""
for type, combos in type_combos.iteritems(): for type, combos in sorted(type_combos.items()):
internal_format_cases = "" internal_format_cases = ""
for internal_format in combos: for internal_format in combos:
internal_format_cases += " case " + internal_format + ":\n" internal_format_cases += " case " + internal_format + ":\n"
......
#!/usr/bin/python #!/usr/bin/python3
# Copyright 2016 The ANGLE Project Authors. All rights reserved. # Copyright 2016 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
...@@ -53,7 +53,7 @@ def load_with_override(override_path): ...@@ -53,7 +53,7 @@ def load_with_override(override_path):
results = load_without_override() results = load_without_override()
overrides = load_json(override_path) overrides = load_json(override_path)
for k, v in overrides.iteritems(): for k, v in sorted(overrides.items()):
results[k] = v results[k] = v
return results return results
...@@ -95,7 +95,7 @@ def get_component_type(format_id): ...@@ -95,7 +95,7 @@ def get_component_type(format_id):
def get_channel_tokens(format_id): def get_channel_tokens(format_id):
r = re.compile(r'([' + kChannels + '][\d]+)') 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): def get_channels(format_id):
......
#!/usr/bin/python #!/usr/bin/python3
# Copyright 2015 The ANGLE Project Authors. All rights reserved. # Copyright 2015 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
...@@ -84,9 +84,10 @@ def get_swizzle_format_id(internal_format, angle_format): ...@@ -84,9 +84,10 @@ def get_swizzle_format_id(internal_format, angle_format):
internal_format) internal_format)
bits = angle_format['bits'] 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( 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 # 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. # 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): ...@@ -196,7 +197,7 @@ def json_to_table_data(internal_format, format_name, prefix, json):
"condition": prefix, "condition": prefix,
} }
for k, v in json.iteritems(): for k, v in sorted(json.items()):
parsed[k] = v parsed[k] = v
# Derived values. # Derived values.
...@@ -217,15 +218,15 @@ def parse_json_angle_format_case(format_name, angle_format, json_data): ...@@ -217,15 +218,15 @@ def parse_json_angle_format_case(format_name, angle_format, json_data):
support_test = None support_test = None
fallback = None fallback = None
for k, v in angle_format.iteritems(): for k, v in sorted(angle_format.items()):
if k == "FL10Plus": if k == "FL10Plus":
assert support_test is None assert support_test is None
support_test = "OnlyFL10Plus(deviceCaps)" support_test = "OnlyFL10Plus(deviceCaps)"
for k2, v2 in v.iteritems(): for k2, v2 in sorted(v.items()):
supported_case[k2] = v2 supported_case[k2] = v2
elif k == "FL9_3": elif k == "FL9_3":
split = True split = True
for k2, v2 in v.iteritems(): for k2, v2 in sorted(v.items()):
unsupported_case[k2] = v2 unsupported_case[k2] = v2
elif k == "supportTest": elif k == "supportTest":
assert support_test is None assert support_test is None
...@@ -250,7 +251,7 @@ def parse_json_angle_format_case(format_name, angle_format, json_data): ...@@ -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): def parse_json_into_switch_angle_format_string(json_map, json_data):
table_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: if format_name not in json_data:
continue continue
...@@ -289,9 +290,9 @@ def main(): ...@@ -289,9 +290,9 @@ def main():
outputs = ['texture_format_table_autogen.cpp'] outputs = ['texture_format_table_autogen.cpp']
if sys.argv[1] == 'inputs': if sys.argv[1] == 'inputs':
print ','.join(inputs) print(','.join(inputs))
elif sys.argv[1] == 'outputs': elif sys.argv[1] == 'outputs':
print ','.join(outputs) print(','.join(outputs))
else: else:
print('Invalid script parameters') print('Invalid script parameters')
return 1 return 1
......
#!/usr/bin/python #!/usr/bin/python3
# Copyright 2016 The ANGLE Project Authors. All rights reserved. # Copyright 2016 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
...@@ -93,7 +93,7 @@ const Format *GetFormatInfoTable() ...@@ -93,7 +93,7 @@ const Format *GetFormatInfoTable()
def ceil_int(value, mod): def ceil_int(value, mod):
assert mod > 0 and value > 0, 'integer modulation should be larger than 0' 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): def is_depth_stencil(angle_format):
...@@ -287,7 +287,7 @@ def json_to_table_data(format_id, json, angle_to_gl): ...@@ -287,7 +287,7 @@ def json_to_table_data(format_id, json, angle_to_gl):
"fastCopyFunctions": "NoCopyFunctions", "fastCopyFunctions": "NoCopyFunctions",
} }
for k, v in json.iteritems(): for k, v in sorted(json.items()):
parsed[k] = v parsed[k] = v
if "glInternalFormat" not in parsed: if "glInternalFormat" not in parsed:
...@@ -407,9 +407,9 @@ def main(): ...@@ -407,9 +407,9 @@ def main():
outputs = ['Format_table_autogen.cpp', 'FormatID_autogen.h'] outputs = ['Format_table_autogen.cpp', 'FormatID_autogen.h']
if sys.argv[1] == 'inputs': if sys.argv[1] == 'inputs':
print ','.join(inputs) print(','.join(inputs))
elif sys.argv[1] == 'outputs': elif sys.argv[1] == 'outputs':
print ','.join(outputs) print(','.join(outputs))
else: else:
print('Invalid script parameters') print('Invalid script parameters')
return 1 return 1
......
#!/usr/bin/python #!/usr/bin/python3
# Copyright 2016 The ANGLE Project Authors. All rights reserved. # Copyright 2016 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
import sys import sys
import angle_format import angle_format
from functools import reduce
template_cpp = """// GENERATED FILE - DO NOT EDIT. template_cpp = """// GENERATED FILE - DO NOT EDIT.
// Generated by {script_name} using data from {data_source_name}. // Generated by {script_name} using data from {data_source_name}.
// //
...@@ -93,9 +95,9 @@ def main(): ...@@ -93,9 +95,9 @@ def main():
outputs = ['dxgi_format_map_autogen.cpp'] outputs = ['dxgi_format_map_autogen.cpp']
if sys.argv[1] == 'inputs': if sys.argv[1] == 'inputs':
print ','.join(inputs) print(','.join(inputs))
elif sys.argv[1] == 'outputs': elif sys.argv[1] == 'outputs':
print ','.join(outputs) print(','.join(outputs))
else: else:
print('Invalid script parameters') print('Invalid script parameters')
return 1 return 1
...@@ -119,7 +121,7 @@ def main(): ...@@ -119,7 +121,7 @@ def main():
all_angle = angle_format.get_all_angle_formats() 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()] found = [ctype in dxgi_format for ctype in types.keys()]
count = reduce((lambda a, b: int(a) + int(b)), found) count = reduce((lambda a, b: int(a) + int(b)), found)
...@@ -127,7 +129,8 @@ def main(): ...@@ -127,7 +129,8 @@ def main():
component_type = 'GL_NONE' component_type = 'GL_NONE'
if count == 1: 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) component_cases += format_case(dxgi_format, gltype)
else: else:
component_cases += undefined_case(dxgi_format) component_cases += undefined_case(dxgi_format)
......
#!/usr/bin/python #!/usr/bin/python3
# Copyright 2015 The ANGLE Project Authors. All rights reserved. # Copyright 2015 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
...@@ -183,7 +183,7 @@ def do_format(format_data): ...@@ -183,7 +183,7 @@ def do_format(format_data):
'mipAutoGen': macro_prefix + 'MIPGEN' '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() always_supported = set()
never_supported = set() never_supported = set()
...@@ -198,7 +198,7 @@ def do_format(format_data): ...@@ -198,7 +198,7 @@ def do_format(format_data):
fl_10_0_check_10_1_supported = set() fl_10_0_check_10_1_supported = set()
fl_10_0_check_11_0_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]] d3d_flag = [json_flag_to_d3d[json_flag]]
...@@ -306,9 +306,9 @@ def main(): ...@@ -306,9 +306,9 @@ def main():
outputs = ['dxgi_support_table_autogen.cpp'] outputs = ['dxgi_support_table_autogen.cpp']
if sys.argv[1] == 'inputs': if sys.argv[1] == 'inputs':
print ','.join(inputs) print(','.join(inputs))
elif sys.argv[1] == 'outputs': elif sys.argv[1] == 'outputs':
print ','.join(outputs) print(','.join(outputs))
else: else:
print('Invalid script parameters') print('Invalid script parameters')
return 1 return 1
......
#!/usr/bin/python #!/usr/bin/python3
# Copyright 2015 The ANGLE Project Authors. All rights reserved. # Copyright 2015 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
...@@ -112,7 +112,7 @@ def get_load_func(func_name, type_functions): ...@@ -112,7 +112,7 @@ def get_load_func(func_name, type_functions):
snippet += "{\n" snippet += "{\n"
snippet += " switch (type)\n" snippet += " switch (type)\n"
snippet += " {\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" snippet += " case " + gl_type + ":\n"
requiresConversion = str('LoadToNative<' not in load_function).lower() requiresConversion = str('LoadToNative<' not in load_function).lower()
snippet += " return LoadImageFunctionInfo(" + load_function + ", " + requiresConversion + ");\n" snippet += " return LoadImageFunctionInfo(" + load_function + ", " + requiresConversion + ");\n"
...@@ -135,14 +135,14 @@ def get_unknown_load_func(angle_to_type_map, internal_format): ...@@ -135,14 +135,14 @@ def get_unknown_load_func(angle_to_type_map, internal_format):
def parse_json(json_data): def parse_json(json_data):
table_data = '' table_data = ''
load_functions_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 = ' ' s = ' '
table_data += s + 'case ' + internal_format + ':\n' table_data += s + 'case ' + internal_format + ':\n'
do_switch = len( do_switch = len(angle_to_type_map) > 1 or list(
angle_to_type_map) > 1 or angle_to_type_map.keys()[0] != angle_format_unknown angle_to_type_map)[0] != angle_format_unknown
if do_switch: if do_switch:
table_data += s + '{\n' table_data += s + '{\n'
...@@ -151,7 +151,7 @@ def parse_json(json_data): ...@@ -151,7 +151,7 @@ def parse_json(json_data):
table_data += s + '{\n' table_data += s + '{\n'
s += ' ' 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: if angle_format == angle_format_unknown:
continue continue
...@@ -163,7 +163,8 @@ def parse_json(json_data): ...@@ -163,7 +163,8 @@ def parse_json(json_data):
table_data += s + ' return ' + func_name + ';\n' table_data += s + ' return ' + func_name + ';\n'
if angle_format_unknown in angle_to_type_map: 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: if gl_type not in type_functions:
type_functions[gl_type] = load_function type_functions[gl_type] = load_function
...@@ -201,9 +202,9 @@ def main(): ...@@ -201,9 +202,9 @@ def main():
outputs = ['load_functions_table_autogen.cpp'] outputs = ['load_functions_table_autogen.cpp']
if sys.argv[1] == 'inputs': if sys.argv[1] == 'inputs':
print ','.join(inputs) print(','.join(inputs))
elif sys.argv[1] == 'outputs': elif sys.argv[1] == 'outputs':
print ','.join(outputs) print(','.join(outputs))
else: else:
print('Invalid script parameters') print('Invalid script parameters')
return 1 return 1
......
#!/usr/bin/python #!/usr/bin/python3
# Copyright 2017 The ANGLE Project Authors. All rights reserved. # Copyright 2017 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
...@@ -261,9 +261,9 @@ def main(): ...@@ -261,9 +261,9 @@ def main():
] ]
if sys.argv[1] == 'inputs': if sys.argv[1] == 'inputs':
print ','.join(inputs) print(','.join(inputs))
elif sys.argv[1] == 'outputs': elif sys.argv[1] == 'outputs':
print ','.join(outputs) print(','.join(outputs))
else: else:
print('Invalid script parameters') print('Invalid script parameters')
return 1 return 1
...@@ -331,7 +331,7 @@ def main(): ...@@ -331,7 +331,7 @@ def main():
# Used later in the NULL bindings. # Used later in the NULL bindings.
all_entry_points = [] 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: for entry_point_no_prefix in entry_points:
entry_point = "gl" + entry_point_no_prefix entry_point = "gl" + entry_point_no_prefix
...@@ -398,7 +398,7 @@ def main(): ...@@ -398,7 +398,7 @@ def main():
raise Exception('Entry point ' + entry_point + ' not found in the xml.') raise Exception('Entry point ' + entry_point + ' not found in the xml.')
table_data = [] table_data = []
for comment, entry_points in sorted(json_data.iteritems()): for comment, entry_points in sorted(json_data.items()):
formatted = [" // " + comment] formatted = [" // " + comment]
formatted += [format_ep_decl(entry_point) for entry_point in sorted(entry_points)] formatted += [format_ep_decl(entry_point) for entry_point in sorted(entry_points)]
...@@ -414,25 +414,25 @@ def main(): ...@@ -414,25 +414,25 @@ def main():
out.write(dispatch_table_header) out.write(dispatch_table_header)
gl_data = [] 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_data.append(format_requirements_lines(gl_required, entry_points))
gl_extensions_data = [] 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( gl_extensions_data.append(
format_extension_requirements_lines(extension, entry_points, "gl")) format_extension_requirements_lines(extension, entry_points, "gl"))
gles2_data = [] 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_data.append(format_requirements_lines(gles2_required, entry_points))
gles2_extensions_data = [] 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( gles2_extensions_data.append(
format_extension_requirements_lines(extension, entry_points, "gles2")) format_extension_requirements_lines(extension, entry_points, "gles2"))
both_extensions_data = [] 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( both_extensions_data.append(
format_extension_requirements_lines(extension, entry_points, "gles2|gl")) format_extension_requirements_lines(extension, entry_points, "gles2|gl"))
......
#!/usr/bin/python #!/usr/bin/python3
# Copyright 2019 The ANGLE Project Authors. All rights reserved. # Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
...@@ -81,9 +81,9 @@ def main(): ...@@ -81,9 +81,9 @@ def main():
outputs = ['format_autogen.h', 'mtl_default_shaders_src_autogen.inc'] outputs = ['format_autogen.h', 'mtl_default_shaders_src_autogen.inc']
if sys.argv[1] == 'inputs': if sys.argv[1] == 'inputs':
print ','.join(inputs) print(','.join(inputs))
elif sys.argv[1] == 'outputs': elif sys.argv[1] == 'outputs':
print ','.join(outputs) print(','.join(outputs))
else: else:
print('Invalid script parameters') print('Invalid script parameters')
return 1 return 1
...@@ -111,7 +111,8 @@ def main(): ...@@ -111,7 +111,8 @@ def main():
temp_fname = 'temp_master_source.metal' temp_fname = 'temp_master_source.metal'
with open(temp_fname, 'wb') as temp_file: with open(temp_fname, 'wb') as temp_file:
for src_file in src_files: 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] args = [clang]
if not os.name == 'nt': if not os.name == 'nt':
...@@ -121,7 +122,7 @@ def main(): ...@@ -121,7 +122,7 @@ def main():
combined_source = subprocess.check_output(args) combined_source = subprocess.check_output(args)
# Remove '@@' tokens # 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: # Generate final file:
with open('mtl_default_shaders_src_autogen.inc', 'wt') as out_file: with open('mtl_default_shaders_src_autogen.inc', 'wt') as out_file:
...@@ -129,7 +130,7 @@ def main(): ...@@ -129,7 +130,7 @@ def main():
out_file.write('\n') out_file.write('\n')
out_file.write('// C++ string version of combined Metal default shaders.\n\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('\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.write(')";\n') out_file.write(')";\n')
out_file.close() out_file.close()
......
#!/usr/bin/python #!/usr/bin/python3
# Copyright 2016 The ANGLE Project Authors. All rights reserved. # Copyright 2016 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
...@@ -122,7 +122,7 @@ def verify_vk_map_keys(angle_to_gl, vk_json_data): ...@@ -122,7 +122,7 @@ def verify_vk_map_keys(angle_to_gl, vk_json_data):
for table in ["map", "fallbacks"]: for table in ["map", "fallbacks"]:
for angle_format in vk_json_data[table].keys(): for angle_format in vk_json_data[table].keys():
if not angle_format in angle_to_gl.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 no_error = False
return no_error return no_error
...@@ -242,9 +242,9 @@ def main(): ...@@ -242,9 +242,9 @@ def main():
outputs = [out_file_name] outputs = [out_file_name]
if sys.argv[1] == 'inputs': if sys.argv[1] == 'inputs':
print ','.join(inputs) print(','.join(inputs))
elif sys.argv[1] == 'outputs': elif sys.argv[1] == 'outputs':
print ','.join(outputs) print(','.join(outputs))
else: else:
print('Invalid script parameters') print('Invalid script parameters')
return 1 return 1
...@@ -258,23 +258,23 @@ def main(): ...@@ -258,23 +258,23 @@ def main():
format_id_cases = [ format_id_cases = [
get_format_id_case(format_id, vk_format) 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 = [ vk_format_cases = [
get_vk_format_case(format_id, vk_format) 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 = [ 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( output_cpp = template_table_autogen_cpp.format(
format_case_data="\n".join(vk_cases), format_case_data="\n".join(vk_cases),
format_id_cases=",\n".join(format_id_cases), format_id_cases=",\n".join(format_id_cases),
vk_format_cases="".join(vk_format_cases), vk_format_cases="".join(vk_format_cases),
script_name=__file__, script_name=os.path.basename(__file__),
out_file_name=out_file_name, out_file_name=out_file_name,
input_file_name=input_file_name) input_file_name=input_file_name)
......
...@@ -2372,153 +2372,153 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat) ...@@ -2372,153 +2372,153 @@ void Format::initialize(RendererVk *renderer, const angle::Format &angleFormat)
VkFormat GetVkFormatFromFormatID(angle::FormatID formatID) VkFormat GetVkFormatFromFormatID(angle::FormatID formatID)
{ {
static constexpr angle::FormatMap<VkFormat> kMap = { static constexpr angle::FormatMap<VkFormat> kMap = {
{angle::FormatID::R8G8_USCALED, VK_FORMAT_R8G8_USCALED}, {angle::FormatID::A1R5G5B5_UNORM, VK_FORMAT_A1R5G5B5_UNORM_PACK16},
{angle::FormatID::D32_FLOAT_S8X24_UINT, VK_FORMAT_D32_SFLOAT_S8_UINT}, {angle::FormatID::ASTC_10x10_SRGB_BLOCK, VK_FORMAT_ASTC_10x10_SRGB_BLOCK},
{angle::FormatID::ETC2_R8G8B8_SRGB_BLOCK, VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK}, {angle::FormatID::ASTC_10x10_UNORM_BLOCK, VK_FORMAT_ASTC_10x10_UNORM_BLOCK},
{angle::FormatID::R32G32B32A32_SINT, VK_FORMAT_R32G32B32A32_SINT}, {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_SRGB_BLOCK, VK_FORMAT_ASTC_10x8_SRGB_BLOCK},
{angle::FormatID::R16G16B16_USCALED, VK_FORMAT_R16G16B16_USCALED}, {angle::FormatID::ASTC_10x8_UNORM_BLOCK, VK_FORMAT_ASTC_10x8_UNORM_BLOCK},
{angle::FormatID::BC4_RED_SNORM_BLOCK, VK_FORMAT_BC4_SNORM_BLOCK}, {angle::FormatID::ASTC_12x10_SRGB_BLOCK, VK_FORMAT_ASTC_12x10_SRGB_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::ASTC_12x10_UNORM_BLOCK, VK_FORMAT_ASTC_12x10_UNORM_BLOCK},
{angle::FormatID::R8G8B8_SSCALED, VK_FORMAT_R8G8B8_SSCALED}, {angle::FormatID::ASTC_12x12_SRGB_BLOCK, VK_FORMAT_ASTC_12x12_SRGB_BLOCK},
{angle::FormatID::R32G32B32_UINT, VK_FORMAT_R32G32B32_UINT}, {angle::FormatID::ASTC_12x12_UNORM_BLOCK, VK_FORMAT_ASTC_12x12_UNORM_BLOCK},
{angle::FormatID::R16_SINT, VK_FORMAT_R16_SINT}, {angle::FormatID::ASTC_4x4_SRGB_BLOCK, VK_FORMAT_ASTC_4x4_SRGB_BLOCK},
{angle::FormatID::D16_UNORM, VK_FORMAT_D16_UNORM},
{angle::FormatID::ASTC_4x4_UNORM_BLOCK, VK_FORMAT_ASTC_4x4_UNORM_BLOCK}, {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::ASTC_10x10_SRGB_BLOCK, VK_FORMAT_ASTC_10x10_SRGB_BLOCK},
{angle::FormatID::R10G10B10A2_UNORM, VK_FORMAT_A2B10G10R10_UNORM_PACK32},
{angle::FormatID::ASTC_12x10_SRGB_BLOCK, VK_FORMAT_ASTC_12x10_SRGB_BLOCK},
{angle::FormatID::ASTC_5x4_SRGB_BLOCK, VK_FORMAT_ASTC_5x4_SRGB_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::ASTC_5x4_UNORM_BLOCK, VK_FORMAT_ASTC_5x4_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_5x5_SRGB_BLOCK, VK_FORMAT_ASTC_5x5_SRGB_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_5x5_UNORM_BLOCK, VK_FORMAT_ASTC_5x5_UNORM_BLOCK},
{angle::FormatID::ASTC_8x6_SRGB_BLOCK, VK_FORMAT_ASTC_8x6_SRGB_BLOCK}, {angle::FormatID::ASTC_6x5_SRGB_BLOCK, VK_FORMAT_ASTC_6x5_SRGB_BLOCK},
{angle::FormatID::R8G8B8A8_USCALED, VK_FORMAT_R8G8B8A8_USCALED},
{angle::FormatID::ASTC_6x5_UNORM_BLOCK, VK_FORMAT_ASTC_6x5_UNORM_BLOCK}, {angle::FormatID::ASTC_6x5_UNORM_BLOCK, VK_FORMAT_ASTC_6x5_UNORM_BLOCK},
{angle::FormatID::R8G8B8A8_UINT, VK_FORMAT_R8G8B8A8_UINT},
{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_UNORM, VK_FORMAT_R8G8B8A8_UNORM},
{angle::FormatID::ASTC_6x6_SRGB_BLOCK, VK_FORMAT_ASTC_6x6_SRGB_BLOCK}, {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::ASTC_6x6_UNORM_BLOCK, VK_FORMAT_ASTC_6x6_UNORM_BLOCK},
{angle::FormatID::ETC2_R8G8B8A1_SRGB_BLOCK, VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK}, {angle::FormatID::ASTC_8x5_SRGB_BLOCK, VK_FORMAT_ASTC_8x5_SRGB_BLOCK},
{angle::FormatID::R16G16B16_SSCALED, VK_FORMAT_R16G16B16_SSCALED}, {angle::FormatID::ASTC_8x5_UNORM_BLOCK, VK_FORMAT_ASTC_8x5_UNORM_BLOCK},
{angle::FormatID::R16G16_UNORM, VK_FORMAT_R16G16_UNORM}, {angle::FormatID::ASTC_8x6_SRGB_BLOCK, VK_FORMAT_ASTC_8x6_SRGB_BLOCK},
{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::ASTC_8x6_UNORM_BLOCK, VK_FORMAT_ASTC_8x6_UNORM_BLOCK},
{angle::FormatID::EAC_R11G11_SNORM_BLOCK, VK_FORMAT_EAC_R11G11_SNORM_BLOCK}, {angle::FormatID::ASTC_8x8_SRGB_BLOCK, VK_FORMAT_ASTC_8x8_SRGB_BLOCK},
{angle::FormatID::R10G10B10A2_SSCALED, VK_FORMAT_A2B10G10R10_SSCALED_PACK32}, {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_BLOCK, VK_FORMAT_BC1_RGBA_UNORM_BLOCK},
{angle::FormatID::R32G32_SINT, VK_FORMAT_R32G32_SINT}, {angle::FormatID::BC1_RGBA_UNORM_SRGB_BLOCK, VK_FORMAT_BC1_RGBA_SRGB_BLOCK},
{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::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::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_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_UINT, VK_FORMAT_A2B10G10R10_UINT_PACK32},
{angle::FormatID::ASTC_6x5_SRGB_BLOCK, VK_FORMAT_ASTC_6x5_SRGB_BLOCK}, {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_FLOAT, VK_FORMAT_R16G16_SFLOAT},
{angle::FormatID::B5G6R5_UNORM, VK_FORMAT_B5G6R5_UNORM_PACK16}, {angle::FormatID::R16G16_SINT, VK_FORMAT_R16G16_SINT},
{angle::FormatID::R32_FLOAT, VK_FORMAT_R32_SFLOAT}, {angle::FormatID::R16G16_SNORM, VK_FORMAT_R16G16_SNORM},
{angle::FormatID::ASTC_12x12_SRGB_BLOCK, VK_FORMAT_ASTC_12x12_SRGB_BLOCK}, {angle::FormatID::R16G16_SSCALED, VK_FORMAT_R16G16_SSCALED},
{angle::FormatID::ASTC_5x5_UNORM_BLOCK, VK_FORMAT_ASTC_5x5_UNORM_BLOCK}, {angle::FormatID::R16G16_UINT, VK_FORMAT_R16G16_UINT},
{angle::FormatID::R8G8B8_SINT, VK_FORMAT_R8G8B8_SINT}, {angle::FormatID::R16G16_UNORM, VK_FORMAT_R16G16_UNORM},
{angle::FormatID::ASTC_8x8_UNORM_BLOCK, VK_FORMAT_ASTC_8x8_UNORM_BLOCK}, {angle::FormatID::R16G16_USCALED, VK_FORMAT_R16G16_USCALED},
{angle::FormatID::R32_SINT, VK_FORMAT_R32_SINT}, {angle::FormatID::R16_FLOAT, VK_FORMAT_R16_SFLOAT},
{angle::FormatID::ETC2_R8G8B8A1_UNORM_BLOCK, VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK}, {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_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::R16_UINT, VK_FORMAT_R16_UINT},
{angle::FormatID::R8_UNORM, VK_FORMAT_R8_UNORM}, {angle::FormatID::R16_UNORM, VK_FORMAT_R16_UNORM},
{angle::FormatID::R32G32_FLOAT, VK_FORMAT_R32G32_SFLOAT}, {angle::FormatID::R16_USCALED, VK_FORMAT_R16_USCALED},
{angle::FormatID::BC5_RG_SNORM_BLOCK, VK_FORMAT_BC5_SNORM_BLOCK}, {angle::FormatID::R32G32B32A32_FLOAT, VK_FORMAT_R32G32B32A32_SFLOAT},
{angle::FormatID::R16G16B16A16_SNORM, VK_FORMAT_R16G16B16A16_SNORM}, {angle::FormatID::R32G32B32A32_SINT, VK_FORMAT_R32G32B32A32_SINT},
{angle::FormatID::R8G8_UNORM, VK_FORMAT_R8G8_UNORM}, {angle::FormatID::R32G32B32A32_UINT, VK_FORMAT_R32G32B32A32_UINT},
{angle::FormatID::ASTC_10x6_SRGB_BLOCK, VK_FORMAT_ASTC_10x6_SRGB_BLOCK}, {angle::FormatID::R32G32B32_FLOAT, VK_FORMAT_R32G32B32_SFLOAT},
{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::R32G32B32_SINT, VK_FORMAT_R32G32B32_SINT},
{angle::FormatID::R10G10B10A2_USCALED, VK_FORMAT_A2B10G10R10_USCALED_PACK32}, {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::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::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::R8G8B8_SNORM, VK_FORMAT_R8G8B8_SNORM},
{angle::FormatID::R8G8B8_SSCALED, VK_FORMAT_R8G8B8_SSCALED},
{angle::FormatID::R8G8B8_UINT, VK_FORMAT_R8G8B8_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_SINT, VK_FORMAT_R8G8_SINT},
{angle::FormatID::R16G16B16A16_SSCALED, VK_FORMAT_R16G16B16A16_SSCALED}, {angle::FormatID::R8G8_SNORM, VK_FORMAT_R8G8_SNORM},
{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::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::R8G8_UINT, VK_FORMAT_R8G8_UINT},
{angle::FormatID::R5G5B5A1_UNORM, VK_FORMAT_R5G5B5A1_UNORM_PACK16}, {angle::FormatID::R8G8_UNORM, VK_FORMAT_R8G8_UNORM},
{angle::FormatID::R8G8B8_UINT, VK_FORMAT_R8G8B8_UINT}, {angle::FormatID::R8G8_USCALED, VK_FORMAT_R8G8_USCALED},
{angle::FormatID::G8_B8_R8_3PLANE_420_UNORM, VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM}, {angle::FormatID::R8_SINT, VK_FORMAT_R8_SINT},
{angle::FormatID::ETC2_R8G8B8_UNORM_BLOCK, VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK}, {angle::FormatID::R8_SNORM, VK_FORMAT_R8_SNORM},
{angle::FormatID::R32_UINT, VK_FORMAT_R32_UINT}, {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::R9G9B9E5_SHAREDEXP, VK_FORMAT_E5B9G9R9_UFLOAT_PACK32},
{angle::FormatID::BC4_RED_UNORM_BLOCK, VK_FORMAT_BC4_UNORM_BLOCK}, {angle::FormatID::S8_UINT, VK_FORMAT_S8_UINT}};
{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}};
return kMap[formatID]; return kMap[formatID];
} }
...@@ -2527,300 +2527,300 @@ angle::FormatID GetFormatIDFromVkFormat(VkFormat vkFormat) ...@@ -2527,300 +2527,300 @@ angle::FormatID GetFormatIDFromVkFormat(VkFormat vkFormat)
{ {
switch (vkFormat) switch (vkFormat)
{ {
case VK_FORMAT_R8G8_USCALED: case VK_FORMAT_A1R5G5B5_UNORM_PACK16:
return angle::FormatID::R8G8_USCALED; return angle::FormatID::A1R5G5B5_UNORM;
case VK_FORMAT_D32_SFLOAT_S8_UINT: case VK_FORMAT_ASTC_10x10_SRGB_BLOCK:
return angle::FormatID::D32_FLOAT_S8X24_UINT; return angle::FormatID::ASTC_10x10_SRGB_BLOCK;
case VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK: case VK_FORMAT_ASTC_10x10_UNORM_BLOCK:
return angle::FormatID::ETC2_R8G8B8_SRGB_BLOCK; return angle::FormatID::ASTC_10x10_UNORM_BLOCK;
case VK_FORMAT_R32G32B32A32_SINT: case VK_FORMAT_ASTC_10x5_SRGB_BLOCK:
return angle::FormatID::R32G32B32A32_SINT; 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: case VK_FORMAT_ASTC_10x8_SRGB_BLOCK:
return angle::FormatID::ASTC_10x8_SRGB_BLOCK; return angle::FormatID::ASTC_10x8_SRGB_BLOCK;
case VK_FORMAT_R16G16B16_USCALED: case VK_FORMAT_ASTC_10x8_UNORM_BLOCK:
return angle::FormatID::R16G16B16_USCALED; return angle::FormatID::ASTC_10x8_UNORM_BLOCK;
case VK_FORMAT_BC4_SNORM_BLOCK: case VK_FORMAT_ASTC_12x10_SRGB_BLOCK:
return angle::FormatID::BC4_RED_SNORM_BLOCK; return angle::FormatID::ASTC_12x10_SRGB_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: case VK_FORMAT_ASTC_12x10_UNORM_BLOCK:
return angle::FormatID::ASTC_12x10_UNORM_BLOCK; return angle::FormatID::ASTC_12x10_UNORM_BLOCK;
case VK_FORMAT_R8G8B8_SSCALED: case VK_FORMAT_ASTC_12x12_SRGB_BLOCK:
return angle::FormatID::R8G8B8_SSCALED; return angle::FormatID::ASTC_12x12_SRGB_BLOCK;
case VK_FORMAT_R32G32B32_UINT: case VK_FORMAT_ASTC_12x12_UNORM_BLOCK:
return angle::FormatID::R32G32B32_UINT; return angle::FormatID::ASTC_12x12_UNORM_BLOCK;
case VK_FORMAT_R16_SINT: case VK_FORMAT_ASTC_4x4_SRGB_BLOCK:
return angle::FormatID::R16_SINT; return angle::FormatID::ASTC_4x4_SRGB_BLOCK;
case VK_FORMAT_D16_UNORM:
return angle::FormatID::D16_UNORM;
case VK_FORMAT_ASTC_4x4_UNORM_BLOCK: case VK_FORMAT_ASTC_4x4_UNORM_BLOCK:
return angle::FormatID::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_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_12x10_SRGB_BLOCK:
return angle::FormatID::ASTC_12x10_SRGB_BLOCK;
case VK_FORMAT_ASTC_5x4_SRGB_BLOCK: case VK_FORMAT_ASTC_5x4_SRGB_BLOCK:
return angle::FormatID::ASTC_5x4_SRGB_BLOCK; return angle::FormatID::ASTC_5x4_SRGB_BLOCK;
case VK_FORMAT_ASTC_8x5_UNORM_BLOCK: case VK_FORMAT_ASTC_5x4_UNORM_BLOCK:
return angle::FormatID::ASTC_8x5_UNORM_BLOCK; return angle::FormatID::ASTC_5x4_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_5x5_SRGB_BLOCK: case VK_FORMAT_ASTC_5x5_SRGB_BLOCK:
return angle::FormatID::ASTC_5x5_SRGB_BLOCK; return angle::FormatID::ASTC_5x5_SRGB_BLOCK;
case VK_FORMAT_EAC_R11_SNORM_BLOCK: case VK_FORMAT_ASTC_5x5_UNORM_BLOCK:
return angle::FormatID::EAC_R11_SNORM_BLOCK; return angle::FormatID::ASTC_5x5_UNORM_BLOCK;
case VK_FORMAT_ASTC_8x6_SRGB_BLOCK: case VK_FORMAT_ASTC_6x5_SRGB_BLOCK:
return angle::FormatID::ASTC_8x6_SRGB_BLOCK; return angle::FormatID::ASTC_6x5_SRGB_BLOCK;
case VK_FORMAT_R8G8B8A8_USCALED:
return angle::FormatID::R8G8B8A8_USCALED;
case VK_FORMAT_ASTC_6x5_UNORM_BLOCK: case VK_FORMAT_ASTC_6x5_UNORM_BLOCK:
return angle::FormatID::ASTC_6x5_UNORM_BLOCK; return angle::FormatID::ASTC_6x5_UNORM_BLOCK;
case VK_FORMAT_R8G8B8A8_UINT:
return angle::FormatID::R8G8B8A8_UINT;
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_UNORM:
return angle::FormatID::R8G8B8A8_UNORM;
case VK_FORMAT_ASTC_6x6_SRGB_BLOCK: case VK_FORMAT_ASTC_6x6_SRGB_BLOCK:
return angle::FormatID::ASTC_6x6_SRGB_BLOCK; return angle::FormatID::ASTC_6x6_SRGB_BLOCK;
case VK_FORMAT_ASTC_10x10_UNORM_BLOCK: case VK_FORMAT_ASTC_6x6_UNORM_BLOCK:
return angle::FormatID::ASTC_10x10_UNORM_BLOCK; return angle::FormatID::ASTC_6x6_UNORM_BLOCK;
case VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK: case VK_FORMAT_ASTC_8x5_SRGB_BLOCK:
return angle::FormatID::ETC2_R8G8B8A1_SRGB_BLOCK; return angle::FormatID::ASTC_8x5_SRGB_BLOCK;
case VK_FORMAT_R16G16B16_SSCALED: case VK_FORMAT_ASTC_8x5_UNORM_BLOCK:
return angle::FormatID::R16G16B16_SSCALED; return angle::FormatID::ASTC_8x5_UNORM_BLOCK;
case VK_FORMAT_R16G16_UNORM: case VK_FORMAT_ASTC_8x6_SRGB_BLOCK:
return angle::FormatID::R16G16_UNORM; return angle::FormatID::ASTC_8x6_SRGB_BLOCK;
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: case VK_FORMAT_ASTC_8x6_UNORM_BLOCK:
return angle::FormatID::ASTC_8x6_UNORM_BLOCK; return angle::FormatID::ASTC_8x6_UNORM_BLOCK;
case VK_FORMAT_EAC_R11G11_SNORM_BLOCK: case VK_FORMAT_ASTC_8x8_SRGB_BLOCK:
return angle::FormatID::EAC_R11G11_SNORM_BLOCK; return angle::FormatID::ASTC_8x8_SRGB_BLOCK;
case VK_FORMAT_A2B10G10R10_SSCALED_PACK32: case VK_FORMAT_ASTC_8x8_UNORM_BLOCK:
return angle::FormatID::R10G10B10A2_SSCALED; 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: case VK_FORMAT_BC1_RGBA_UNORM_BLOCK:
return angle::FormatID::BC1_RGBA_UNORM_BLOCK; return angle::FormatID::BC1_RGBA_UNORM_BLOCK;
case VK_FORMAT_R32G32_SINT: case VK_FORMAT_BC1_RGBA_SRGB_BLOCK:
return angle::FormatID::R32G32_SINT; return angle::FormatID::BC1_RGBA_UNORM_SRGB_BLOCK;
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: case VK_FORMAT_BC1_RGB_UNORM_BLOCK:
return angle::FormatID::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: case VK_FORMAT_BC1_RGB_SRGB_BLOCK:
return angle::FormatID::BC1_RGB_UNORM_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: case VK_FORMAT_BC6H_SFLOAT_BLOCK:
return angle::FormatID::BPTC_RGB_SIGNED_FLOAT_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: case VK_FORMAT_A2B10G10R10_UINT_PACK32:
return angle::FormatID::R10G10B10A2_UINT; return angle::FormatID::R10G10B10A2_UINT;
case VK_FORMAT_ASTC_6x5_SRGB_BLOCK: case VK_FORMAT_A2B10G10R10_UNORM_PACK32:
return angle::FormatID::ASTC_6x5_SRGB_BLOCK; 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: case VK_FORMAT_R16G16_SFLOAT:
return angle::FormatID::R16G16_FLOAT; return angle::FormatID::R16G16_FLOAT;
case VK_FORMAT_B5G6R5_UNORM_PACK16: case VK_FORMAT_R16G16_SINT:
return angle::FormatID::B5G6R5_UNORM; return angle::FormatID::R16G16_SINT;
case VK_FORMAT_R32_SFLOAT: case VK_FORMAT_R16G16_SNORM:
return angle::FormatID::R32_FLOAT; return angle::FormatID::R16G16_SNORM;
case VK_FORMAT_ASTC_12x12_SRGB_BLOCK: case VK_FORMAT_R16G16_SSCALED:
return angle::FormatID::ASTC_12x12_SRGB_BLOCK; return angle::FormatID::R16G16_SSCALED;
case VK_FORMAT_ASTC_5x5_UNORM_BLOCK: case VK_FORMAT_R16G16_UINT:
return angle::FormatID::ASTC_5x5_UNORM_BLOCK; return angle::FormatID::R16G16_UINT;
case VK_FORMAT_R8G8B8_SINT: case VK_FORMAT_R16G16_UNORM:
return angle::FormatID::R8G8B8_SINT; return angle::FormatID::R16G16_UNORM;
case VK_FORMAT_ASTC_8x8_UNORM_BLOCK: case VK_FORMAT_R16G16_USCALED:
return angle::FormatID::ASTC_8x8_UNORM_BLOCK; return angle::FormatID::R16G16_USCALED;
case VK_FORMAT_R32_SINT: case VK_FORMAT_R16_SFLOAT:
return angle::FormatID::R32_SINT; return angle::FormatID::R16_FLOAT;
case VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK: case VK_FORMAT_R16_SINT:
return angle::FormatID::ETC2_R8G8B8A1_UNORM_BLOCK; return angle::FormatID::R16_SINT;
case VK_FORMAT_R16_SNORM:
return angle::FormatID::R16_SNORM;
case VK_FORMAT_R16_SSCALED: case VK_FORMAT_R16_SSCALED:
return angle::FormatID::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: case VK_FORMAT_R16_UINT:
return angle::FormatID::R16_UINT; return angle::FormatID::R16_UINT;
case VK_FORMAT_R8_UNORM: case VK_FORMAT_R16_UNORM:
return angle::FormatID::R8_UNORM; return angle::FormatID::R16_UNORM;
case VK_FORMAT_R32G32_SFLOAT: case VK_FORMAT_R16_USCALED:
return angle::FormatID::R32G32_FLOAT; return angle::FormatID::R16_USCALED;
case VK_FORMAT_BC5_SNORM_BLOCK: case VK_FORMAT_R32G32B32A32_SFLOAT:
return angle::FormatID::BC5_RG_SNORM_BLOCK; return angle::FormatID::R32G32B32A32_FLOAT;
case VK_FORMAT_R16G16B16A16_SNORM: case VK_FORMAT_R32G32B32A32_SINT:
return angle::FormatID::R16G16B16A16_SNORM; return angle::FormatID::R32G32B32A32_SINT;
case VK_FORMAT_R8G8_UNORM: case VK_FORMAT_R32G32B32A32_UINT:
return angle::FormatID::R8G8_UNORM; return angle::FormatID::R32G32B32A32_UINT;
case VK_FORMAT_ASTC_10x6_SRGB_BLOCK: case VK_FORMAT_R32G32B32_SFLOAT:
return angle::FormatID::ASTC_10x6_SRGB_BLOCK; return angle::FormatID::R32G32B32_FLOAT;
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: case VK_FORMAT_R32G32B32_SINT:
return angle::FormatID::R32G32B32_SINT; return angle::FormatID::R32G32B32_SINT;
case VK_FORMAT_A2B10G10R10_USCALED_PACK32: case VK_FORMAT_R32G32B32_UINT:
return angle::FormatID::R10G10B10A2_USCALED; 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_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_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_R8G8B8_SNORM:
return angle::FormatID::R8G8B8_SNORM;
case VK_FORMAT_R8G8B8_SSCALED:
return angle::FormatID::R8G8B8_SSCALED;
case VK_FORMAT_R8G8B8_UINT:
return angle::FormatID::R8G8B8_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: case VK_FORMAT_R8G8_SINT:
return angle::FormatID::R8G8_SINT; return angle::FormatID::R8G8_SINT;
case VK_FORMAT_R16G16B16A16_SSCALED: case VK_FORMAT_R8G8_SNORM:
return angle::FormatID::R16G16B16A16_SSCALED; return angle::FormatID::R8G8_SNORM;
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: case VK_FORMAT_R8G8_SSCALED:
return angle::FormatID::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: case VK_FORMAT_R8G8_UINT:
return angle::FormatID::R8G8_UINT; return angle::FormatID::R8G8_UINT;
case VK_FORMAT_R5G5B5A1_UNORM_PACK16: case VK_FORMAT_R8G8_UNORM:
return angle::FormatID::R5G5B5A1_UNORM; return angle::FormatID::R8G8_UNORM;
case VK_FORMAT_R8G8B8_UINT: case VK_FORMAT_R8G8_USCALED:
return angle::FormatID::R8G8B8_UINT; return angle::FormatID::R8G8_USCALED;
case VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM: case VK_FORMAT_R8_SINT:
return angle::FormatID::G8_B8_R8_3PLANE_420_UNORM; return angle::FormatID::R8_SINT;
case VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK: case VK_FORMAT_R8_SNORM:
return angle::FormatID::ETC2_R8G8B8_UNORM_BLOCK; return angle::FormatID::R8_SNORM;
case VK_FORMAT_R32_UINT: case VK_FORMAT_R8_SSCALED:
return angle::FormatID::R32_UINT; 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: case VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:
return angle::FormatID::R9G9B9E5_SHAREDEXP; return angle::FormatID::R9G9B9E5_SHAREDEXP;
case VK_FORMAT_BC4_UNORM_BLOCK: case VK_FORMAT_S8_UINT:
return angle::FormatID::BC4_RED_UNORM_BLOCK; return angle::FormatID::S8_UINT;
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;
default: default:
return angle::FormatID::NONE; return angle::FormatID::NONE;
......
#!/usr/bin/python #!/usr/bin/python3
# #
# Copyright 2020 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 # Use of this source code is governed by a BSD-style license that can be
...@@ -334,7 +334,7 @@ def main(): ...@@ -334,7 +334,7 @@ def main():
return 0 return 0
format_args = { format_args = {
"script_name": __file__, "script_name": os.path.basename(__file__),
"data_source_name": json_file, "data_source_name": json_file,
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment