Commit 048547e7 by Jiacheng Lu Committed by Commit Bot

Enable EVENT trace to print GLenum as string

Bug: angleproject:3778 Change-Id: Ib3a4bd6ba631e0165d571789bbfab9b4b1905d8d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1737141 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarTobin Ehlis <tobine@google.com>
parent e54c3e3a
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"scripts/generate_loader.py": "scripts/generate_loader.py":
"48c60c668bec42a80378179aae2acc61", "48c60c668bec42a80378179aae2acc61",
"scripts/registry_xml.py": "scripts/registry_xml.py":
"40cac0341003ce27d09003ada7f367b4", "a801192d7b3fc697cf813a57a41031e0",
"scripts/wgl.xml": "scripts/wgl.xml":
"aa96419c582af2f6673430e2847693f4", "aa96419c582af2f6673430e2847693f4",
"src/libEGL/egl_loader_autogen.cpp": "src/libEGL/egl_loader_autogen.cpp":
......
...@@ -6,13 +6,13 @@ ...@@ -6,13 +6,13 @@
"scripts/entry_point_packed_gl_enums.json": "scripts/entry_point_packed_gl_enums.json":
"9ef08db737382d62d2190c9096903902", "9ef08db737382d62d2190c9096903902",
"scripts/generate_entry_points.py": "scripts/generate_entry_points.py":
"11aa814c8ad837e39cd2184b84a67321", "4d8e1090c18839c0bc662e75bd181bb9",
"scripts/gl.xml": "scripts/gl.xml":
"b470cb06b06cbbe7adb2c8129ec85708", "b470cb06b06cbbe7adb2c8129ec85708",
"scripts/gl_angle_ext.xml": "scripts/gl_angle_ext.xml":
"bed6b56a38621721e689ebc19601a556", "bed6b56a38621721e689ebc19601a556",
"scripts/registry_xml.py": "scripts/registry_xml.py":
"40cac0341003ce27d09003ada7f367b4", "a801192d7b3fc697cf813a57a41031e0",
"scripts/wgl.xml": "scripts/wgl.xml":
"aa96419c582af2f6673430e2847693f4", "aa96419c582af2f6673430e2847693f4",
"src/libANGLE/Context_gl_1_0_autogen.h": "src/libANGLE/Context_gl_1_0_autogen.h":
...@@ -140,79 +140,79 @@ ...@@ -140,79 +140,79 @@
"src/libANGLE/validationGL4_autogen.h": "src/libANGLE/validationGL4_autogen.h":
"ebbde7f5154a4d1736330d1fc53b3af7", "ebbde7f5154a4d1736330d1fc53b3af7",
"src/libGL/entry_points_gl_1_0_autogen.cpp": "src/libGL/entry_points_gl_1_0_autogen.cpp":
"63ee802b42763919798ef12e490460a7", "c6f442a800a7e60446591a9f06071e14",
"src/libGL/entry_points_gl_1_0_autogen.h": "src/libGL/entry_points_gl_1_0_autogen.h":
"a2372719bd7fbc4a6b070ecae7d9247a", "a2372719bd7fbc4a6b070ecae7d9247a",
"src/libGL/entry_points_gl_1_1_autogen.cpp": "src/libGL/entry_points_gl_1_1_autogen.cpp":
"67e84f20faf4dd0d04926008ea0a2e9a", "5449af71e5bfa8766285b9b08e511948",
"src/libGL/entry_points_gl_1_1_autogen.h": "src/libGL/entry_points_gl_1_1_autogen.h":
"29ff203c0d402f78d020525a5e5ee447", "29ff203c0d402f78d020525a5e5ee447",
"src/libGL/entry_points_gl_1_2_autogen.cpp": "src/libGL/entry_points_gl_1_2_autogen.cpp":
"424ffac8d5e49c625f4eb45dfbd9734e", "3594a76c8928e43957d9c45d95aaac22",
"src/libGL/entry_points_gl_1_2_autogen.h": "src/libGL/entry_points_gl_1_2_autogen.h":
"db041e9b37eaaf1c31a4b4e2e4e987f4", "db041e9b37eaaf1c31a4b4e2e4e987f4",
"src/libGL/entry_points_gl_1_3_autogen.cpp": "src/libGL/entry_points_gl_1_3_autogen.cpp":
"cc2b8fde7794469a5d71d10e18de6146", "2bbe7cac6820298af2b4d7c7fb8b3f76",
"src/libGL/entry_points_gl_1_3_autogen.h": "src/libGL/entry_points_gl_1_3_autogen.h":
"0c30cbdd3d5b10e9217a049cc2794317", "0c30cbdd3d5b10e9217a049cc2794317",
"src/libGL/entry_points_gl_1_4_autogen.cpp": "src/libGL/entry_points_gl_1_4_autogen.cpp":
"5aeb14595231e98a9b25cf2dd9605a50", "2d1ea222cbd2e5621c1f5493d5422f79",
"src/libGL/entry_points_gl_1_4_autogen.h": "src/libGL/entry_points_gl_1_4_autogen.h":
"6f3dcfd98c18cd53f32e61ee01eabad6", "6f3dcfd98c18cd53f32e61ee01eabad6",
"src/libGL/entry_points_gl_1_5_autogen.cpp": "src/libGL/entry_points_gl_1_5_autogen.cpp":
"8131f5dbea024ed50fe1ccff0d2326db", "a5b7ae36c037a3f58c15e678c7fb80b6",
"src/libGL/entry_points_gl_1_5_autogen.h": "src/libGL/entry_points_gl_1_5_autogen.h":
"8caacff247caecb833b065afaf6e90ef", "8caacff247caecb833b065afaf6e90ef",
"src/libGL/entry_points_gl_2_0_autogen.cpp": "src/libGL/entry_points_gl_2_0_autogen.cpp":
"9187c545b6401d45eb7af0a98d035e51", "adbb395b10d289f63ee0df014faeaf9a",
"src/libGL/entry_points_gl_2_0_autogen.h": "src/libGL/entry_points_gl_2_0_autogen.h":
"f0f58f83717148d58b735af5c435f2ef", "f0f58f83717148d58b735af5c435f2ef",
"src/libGL/entry_points_gl_2_1_autogen.cpp": "src/libGL/entry_points_gl_2_1_autogen.cpp":
"4fb669499e04560153871472b61cd99c", "e9920f0b52c8670058610e266d18062f",
"src/libGL/entry_points_gl_2_1_autogen.h": "src/libGL/entry_points_gl_2_1_autogen.h":
"87cd6d513a5852c56eed9b58484fbe19", "87cd6d513a5852c56eed9b58484fbe19",
"src/libGL/entry_points_gl_3_0_autogen.cpp": "src/libGL/entry_points_gl_3_0_autogen.cpp":
"03da0bab1c9673f3c668e50eae9471bf", "414b18684e8fcf8480005cc6db8442a3",
"src/libGL/entry_points_gl_3_0_autogen.h": "src/libGL/entry_points_gl_3_0_autogen.h":
"47396290a846f808e598acdbca56e9b3", "47396290a846f808e598acdbca56e9b3",
"src/libGL/entry_points_gl_3_1_autogen.cpp": "src/libGL/entry_points_gl_3_1_autogen.cpp":
"e2c31101151f5a96193eead859e8021b", "ae6bbb6f793bc0447b8e3ac18dea6be3",
"src/libGL/entry_points_gl_3_1_autogen.h": "src/libGL/entry_points_gl_3_1_autogen.h":
"6ee6613c0206d99c6afdcd3faddb52a3", "6ee6613c0206d99c6afdcd3faddb52a3",
"src/libGL/entry_points_gl_3_2_autogen.cpp": "src/libGL/entry_points_gl_3_2_autogen.cpp":
"ac9c90e1db85a982329dfd0be26426c1", "71ff573b59ee84d712f019e67c76e7c9",
"src/libGL/entry_points_gl_3_2_autogen.h": "src/libGL/entry_points_gl_3_2_autogen.h":
"347e40b5c9fd08a693bf4ffe713c61e6", "347e40b5c9fd08a693bf4ffe713c61e6",
"src/libGL/entry_points_gl_3_3_autogen.cpp": "src/libGL/entry_points_gl_3_3_autogen.cpp":
"2629a236c149c428e006ff9a99a47bd6", "6fc55298e15efaecbb9617ef5173b4ab",
"src/libGL/entry_points_gl_3_3_autogen.h": "src/libGL/entry_points_gl_3_3_autogen.h":
"2151c64b03364111ad1455609243caba", "2151c64b03364111ad1455609243caba",
"src/libGL/entry_points_gl_4_0_autogen.cpp": "src/libGL/entry_points_gl_4_0_autogen.cpp":
"71dafcdf5735674912db4393ae4fb0cc", "b06de5222528708669f6a8b6842bf17f",
"src/libGL/entry_points_gl_4_0_autogen.h": "src/libGL/entry_points_gl_4_0_autogen.h":
"c5a258322ee6de37ffdbb6f40d5703a2", "c5a258322ee6de37ffdbb6f40d5703a2",
"src/libGL/entry_points_gl_4_1_autogen.cpp": "src/libGL/entry_points_gl_4_1_autogen.cpp":
"10807001f592e3930603456f4d4a3cd8", "218a621549f296c99e0640411c289104",
"src/libGL/entry_points_gl_4_1_autogen.h": "src/libGL/entry_points_gl_4_1_autogen.h":
"ea1e18bf5ed2bd1063c940bd793cb50c", "ea1e18bf5ed2bd1063c940bd793cb50c",
"src/libGL/entry_points_gl_4_2_autogen.cpp": "src/libGL/entry_points_gl_4_2_autogen.cpp":
"00fa653085c5f4f19aafa5f952468966", "b0e59cd5e13e6cb4c6b32866baa167f0",
"src/libGL/entry_points_gl_4_2_autogen.h": "src/libGL/entry_points_gl_4_2_autogen.h":
"e6b93e1c3028230ebf5ba8a09f5f4aca", "e6b93e1c3028230ebf5ba8a09f5f4aca",
"src/libGL/entry_points_gl_4_3_autogen.cpp": "src/libGL/entry_points_gl_4_3_autogen.cpp":
"4b51e0a3d4ab4d8b74903104744bcf46", "5f89441b537870ba74778b305723ad0b",
"src/libGL/entry_points_gl_4_3_autogen.h": "src/libGL/entry_points_gl_4_3_autogen.h":
"60bf8a8337129670875de694386a0a9d", "60bf8a8337129670875de694386a0a9d",
"src/libGL/entry_points_gl_4_4_autogen.cpp": "src/libGL/entry_points_gl_4_4_autogen.cpp":
"f8b38d30ca005adb08858bfe02935c1b", "bd8a5145fe7788634bb24a11cf06b718",
"src/libGL/entry_points_gl_4_4_autogen.h": "src/libGL/entry_points_gl_4_4_autogen.h":
"d0a8c556ffb1c9d4519a66b2868c68b2", "d0a8c556ffb1c9d4519a66b2868c68b2",
"src/libGL/entry_points_gl_4_5_autogen.cpp": "src/libGL/entry_points_gl_4_5_autogen.cpp":
"23b7ca3024a0e3e60583e7dbe6848e80", "3b8238d5a4895e833319201ad21146ef",
"src/libGL/entry_points_gl_4_5_autogen.h": "src/libGL/entry_points_gl_4_5_autogen.h":
"0cc66bfbe40b1120e38ba977c2c95cc1", "0cc66bfbe40b1120e38ba977c2c95cc1",
"src/libGL/entry_points_gl_4_6_autogen.cpp": "src/libGL/entry_points_gl_4_6_autogen.cpp":
"da6e469e201b6a2d3874003ddbc6d721", "5a31fc31f29411675644c87ea0322707",
"src/libGL/entry_points_gl_4_6_autogen.h": "src/libGL/entry_points_gl_4_6_autogen.h":
"d659e18d8caffa8d0729fc1a8bdd79f2", "d659e18d8caffa8d0729fc1a8bdd79f2",
"src/libGL/libGL_autogen.cpp": "src/libGL/libGL_autogen.cpp":
...@@ -220,23 +220,23 @@ ...@@ -220,23 +220,23 @@
"src/libGL/libGL_autogen.def": "src/libGL/libGL_autogen.def":
"b372327de868ff8eaa4f837b7e434f72", "b372327de868ff8eaa4f837b7e434f72",
"src/libGLESv2/entry_points_gles_1_0_autogen.cpp": "src/libGLESv2/entry_points_gles_1_0_autogen.cpp":
"ccf5955c47e40d2b9a6177efa483561f", "5c7c7ece05439ebe23ea21f4152482e7",
"src/libGLESv2/entry_points_gles_1_0_autogen.h": "src/libGLESv2/entry_points_gles_1_0_autogen.h":
"77fa8d307ebf839838f8812786cddc1a", "77fa8d307ebf839838f8812786cddc1a",
"src/libGLESv2/entry_points_gles_2_0_autogen.cpp": "src/libGLESv2/entry_points_gles_2_0_autogen.cpp":
"b4a1105446c70b35094e296b6f70f9b4", "892aa20ee841e55c3d9ca2dfae63f4e5",
"src/libGLESv2/entry_points_gles_2_0_autogen.h": "src/libGLESv2/entry_points_gles_2_0_autogen.h":
"3bbaf1cf42fba5d675e5b54cd1d14df7", "3bbaf1cf42fba5d675e5b54cd1d14df7",
"src/libGLESv2/entry_points_gles_3_0_autogen.cpp": "src/libGLESv2/entry_points_gles_3_0_autogen.cpp":
"006255249002c4319460a8140aa3ea5e", "7ac23a92e6a0bf2e8e2c640b792a2446",
"src/libGLESv2/entry_points_gles_3_0_autogen.h": "src/libGLESv2/entry_points_gles_3_0_autogen.h":
"395f6978219abd5182bbe80cc367e40c", "395f6978219abd5182bbe80cc367e40c",
"src/libGLESv2/entry_points_gles_3_1_autogen.cpp": "src/libGLESv2/entry_points_gles_3_1_autogen.cpp":
"80c1f53990346b655630217825dad8a1", "bbadfecdf0d305d59c5c8a9a5810590d",
"src/libGLESv2/entry_points_gles_3_1_autogen.h": "src/libGLESv2/entry_points_gles_3_1_autogen.h":
"043d09a964c740067bf4279e0b544aed", "043d09a964c740067bf4279e0b544aed",
"src/libGLESv2/entry_points_gles_ext_autogen.cpp": "src/libGLESv2/entry_points_gles_ext_autogen.cpp":
"e5447eeb31048ebb2fba7d909835d41f", "47ff54f009e6f8049280be63f7a10a79",
"src/libGLESv2/entry_points_gles_ext_autogen.h": "src/libGLESv2/entry_points_gles_ext_autogen.h":
"294cc52579b3439e99914c11bb7cd9f6", "294cc52579b3439e99914c11bb7cd9f6",
"src/libGLESv2/libGLESv2_autogen.cpp": "src/libGLESv2/libGLESv2_autogen.cpp":
......
{ {
"scripts/gen_gl_enum_utils.py": "scripts/gen_gl_enum_utils.py":
"b01e8fd8aaf03282f430d98cccc960e4", "fd5253543ac5f06dc72f8e46f372a02b",
"scripts/gl.xml": "scripts/gl.xml":
"b470cb06b06cbbe7adb2c8129ec85708", "b470cb06b06cbbe7adb2c8129ec85708",
"scripts/gl_angle_ext.xml": "scripts/gl_angle_ext.xml":
"bed6b56a38621721e689ebc19601a556", "bed6b56a38621721e689ebc19601a556",
"src/libANGLE/gl_enum_utils_autogen.cpp": "src/libANGLE/gl_enum_utils_autogen.cpp":
"e1b0d3b84de3e2259961c4af2a1e7853", "15ffdf92a6252a40990dbcf298a03782",
"src/libANGLE/gl_enum_utils_autogen.h": "src/libANGLE/gl_enum_utils_autogen.h":
"c04076709a7f310bc313d2eae0713f1e" "938a49b915c5a2fe2e5ec44994181df9"
} }
\ No newline at end of file
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
"scripts/gl_angle_ext.xml": "scripts/gl_angle_ext.xml":
"bed6b56a38621721e689ebc19601a556", "bed6b56a38621721e689ebc19601a556",
"scripts/registry_xml.py": "scripts/registry_xml.py":
"40cac0341003ce27d09003ada7f367b4", "a801192d7b3fc697cf813a57a41031e0",
"scripts/wgl.xml": "scripts/wgl.xml":
"aa96419c582af2f6673430e2847693f4", "aa96419c582af2f6673430e2847693f4",
"src/libGL/proc_table_wgl_autogen.cpp": "src/libGL/proc_table_wgl_autogen.cpp":
......
...@@ -30,6 +30,9 @@ template_gl_enums_header = """// GENERATED FILE - DO NOT EDIT. ...@@ -30,6 +30,9 @@ template_gl_enums_header = """// GENERATED FILE - DO NOT EDIT.
# define LIBANGLE_GL_ENUM_UTILS_AUTOGEN_H_ # define LIBANGLE_GL_ENUM_UTILS_AUTOGEN_H_
#include <string> #include <string>
#include <sstream>
#include "common/PackedGLEnums_autogen.h"
namespace gl namespace gl
{{ {{
...@@ -43,6 +46,14 @@ const char *GLenumToString(GLenumGroup enumGroup, unsigned int value); ...@@ -43,6 +46,14 @@ const char *GLenumToString(GLenumGroup enumGroup, unsigned int value);
std::string GLbitfieldToString(GLenumGroup enumGroup, unsigned int value); std::string GLbitfieldToString(GLenumGroup enumGroup, unsigned int value);
template<typename T>
std::string PackedGLenumToString(GLenum packedEnum) {{
T internalTypeEnum = FromGLenum<T>(packedEnum);
std::stringstream st;
st << internalTypeEnum;
return st.str();
}}
}} }}
# endif // LIBANGLE_GL_ENUM_UTILS_AUTOGEN_H_ # endif // LIBANGLE_GL_ENUM_UTILS_AUTOGEN_H_
...@@ -60,8 +71,6 @@ template_gl_enums_source = """// GENERATED FILE - DO NOT EDIT. ...@@ -60,8 +71,6 @@ template_gl_enums_source = """// GENERATED FILE - DO NOT EDIT.
#include "libANGLE/gl_enum_utils_autogen.h" #include "libANGLE/gl_enum_utils_autogen.h"
#include <sstream>
#include "common/debug.h" #include "common/debug.h"
#include "common/bitset_utils.h" #include "common/bitset_utils.h"
...@@ -116,7 +125,8 @@ template_enum_value_to_string_case = """case {value}: return {name};""" ...@@ -116,7 +125,8 @@ template_enum_value_to_string_case = """case {value}: return {name};"""
export_apis = ['gles2'] export_apis = ['gles2']
export_extensions = registry_xml.supported_extensions export_extensions = registry_xml.supported_extensions
trivial_gl_enums = {'GL_FALSE', 'GL_TRUE', 'GL_NO_ERROR', 'GL_TIMEOUT_IGNORED', 'GL_INVALID_INDEX'} trivial_gl_enums = {'GL_NO_ERROR', 'GL_TIMEOUT_IGNORED', 'GL_INVALID_INDEX'}
trivial_gl_enum_groups = {'SpecialNumbers'}
def dump_value_to_string_mapping(gl_enum_in_groups, exporting_enums): def dump_value_to_string_mapping(gl_enum_in_groups, exporting_enums):
...@@ -174,6 +184,9 @@ def main(header_output_path, source_output_path): ...@@ -174,6 +184,9 @@ def main(header_output_path, source_output_path):
enums_has_group = set() enums_has_group = set()
for enums_group_node in xml.root.findall('groups/group'): for enums_group_node in xml.root.findall('groups/group'):
group_name = enums_group_node.attrib['name'] group_name = enums_group_node.attrib['name']
if group_name in trivial_gl_enum_groups:
continue
if group_name not in gl_enum_in_groups: if group_name not in gl_enum_in_groups:
gl_enum_in_groups[group_name] = dict() gl_enum_in_groups[group_name] = dict()
......
...@@ -366,15 +366,15 @@ reinterpret_cast_to_dict = { ...@@ -366,15 +366,15 @@ reinterpret_cast_to_dict = {
} }
format_dict = { format_dict = {
"GLbitfield": "0x%X", "GLbitfield": "%s",
"GLboolean": "%u", "GLboolean": "%s",
"GLbyte": "%d", "GLbyte": "%d",
"GLclampx": "0x%X", "GLclampx": "0x%X",
"GLDEBUGPROC": "0x%016\" PRIxPTR \"", "GLDEBUGPROC": "0x%016\" PRIxPTR \"",
"GLDEBUGPROCKHR": "0x%016\" PRIxPTR \"", "GLDEBUGPROCKHR": "0x%016\" PRIxPTR \"",
"GLdouble": "%f", "GLdouble": "%f",
"GLeglImageOES": "0x%016\" PRIxPTR \"", "GLeglImageOES": "0x%016\" PRIxPTR \"",
"GLenum": "0x%X", "GLenum": "%s",
"GLfixed": "0x%X", "GLfixed": "0x%X",
"GLfloat": "%f", "GLfloat": "%f",
"GLint": "%d", "GLint": "%d",
...@@ -411,6 +411,10 @@ template_sources_includes = """#include "libGLESv2/entry_points_{header_version} ...@@ -411,6 +411,10 @@ template_sources_includes = """#include "libGLESv2/entry_points_{header_version}
#include "libANGLE/validation{validation_header_version}.h" #include "libANGLE/validation{validation_header_version}.h"
#include "libANGLE/entry_points_utils.h" #include "libANGLE/entry_points_utils.h"
#include "libGLESv2/global_state.h" #include "libGLESv2/global_state.h"
#if defined(ANGLE_TRACE_ENABLED)
# include "libANGLE/gl_enum_utils_autogen.h"
#endif
""" """
template_header_includes_gl32 = """#include <export.h> template_header_includes_gl32 = """#include <export.h>
...@@ -432,6 +436,10 @@ template_sources_includes_gl32 = """#include "libGL/entry_points_{}_autogen.h" ...@@ -432,6 +436,10 @@ template_sources_includes_gl32 = """#include "libGL/entry_points_{}_autogen.h"
#include "libANGLE/validationGL{}{}_autogen.h" #include "libANGLE/validationGL{}{}_autogen.h"
#include "libANGLE/entry_points_utils.h" #include "libANGLE/entry_points_utils.h"
#include "libGLESv2/global_state.h" #include "libGLESv2/global_state.h"
#if defined(ANGLE_TRACE_ENABLED)
# include "libANGLE/gl_enum_utils_autogen.h"
#endif
""" """
template_event_comment = """// Don't run an EVENT() macro on the EXT_debug_marker entry points. template_event_comment = """// Don't run an EVENT() macro on the EXT_debug_marker entry points.
...@@ -617,7 +625,7 @@ def just_the_name_packed(param, reserved_set): ...@@ -617,7 +625,7 @@ def just_the_name_packed(param, reserved_set):
return name return name
def param_print_argument(param): def param_print_argument(command_node, packed_gl_enums, param):
name_only = just_the_name(param) name_only = just_the_name(param)
type_only = just_the_type(param) type_only = just_the_type(param)
...@@ -630,6 +638,21 @@ def param_print_argument(param): ...@@ -630,6 +638,21 @@ def param_print_argument(param):
if type_only in static_cast_to_dict: if type_only in static_cast_to_dict:
return "static_cast<" + static_cast_to_dict[type_only] + ">(" + name_only + ")" return "static_cast<" + static_cast_to_dict[type_only] + ">(" + name_only + ")"
if type_only == "GLbitfield":
group_name = find_gl_enum_group_in_command(command_node, name_only)
return "GLbitfieldToString(GLenumGroup::%s, %s).c_str()" % (group_name, name_only)
if type_only == "GLboolean":
return "GLenumToString(GLenumGroup::Boolean, %s)" % (name_only,)
if type_only == "GLenum":
if name_only in packed_gl_enums:
internal_type = packed_gl_enums[name_only]
return "PackedGLenumToString<%s>(%s).c_str()" % (internal_type, name_only)
else:
group_name = find_gl_enum_group_in_command(command_node, name_only)
return "GLenumToString(GLenumGroup::%s, %s)" % (group_name, name_only)
return name_only return name_only
...@@ -693,7 +716,8 @@ def get_packed_enums(cmd_packed_gl_enums, cmd_name): ...@@ -693,7 +716,8 @@ def get_packed_enums(cmd_packed_gl_enums, cmd_name):
return cmd_packed_gl_enums.get(strip_suffix(cmd_name), {}) return cmd_packed_gl_enums.get(strip_suffix(cmd_name), {})
def format_entry_point_def(cmd_name, proto, params, is_explicit_context, cmd_packed_gl_enums): def format_entry_point_def(command_node, cmd_name, proto, params, is_explicit_context,
cmd_packed_gl_enums):
packed_gl_enums = get_packed_enums(cmd_packed_gl_enums, cmd_name) packed_gl_enums = get_packed_enums(cmd_packed_gl_enums, cmd_name)
internal_params = [just_the_name_packed(param, packed_gl_enums) for param in params] internal_params = [just_the_name_packed(param, packed_gl_enums) for param in params]
packed_gl_enum_conversions = [] packed_gl_enum_conversions = []
...@@ -707,7 +731,7 @@ def format_entry_point_def(cmd_name, proto, params, is_explicit_context, cmd_pac ...@@ -707,7 +731,7 @@ def format_entry_point_def(cmd_name, proto, params, is_explicit_context, cmd_pac
">(" + name + ");" ">(" + name + ");"
] ]
pass_params = [param_print_argument(param) for param in params] pass_params = [param_print_argument(command_node, packed_gl_enums, param) for param in params]
format_params = [param_format_string(param) for param in params] format_params = [param_format_string(param) for param in params]
return_type = proto[:-len(cmd_name)] return_type = proto[:-len(cmd_name)]
default_return = default_return_value(cmd_name, return_type.strip()) default_return = default_return_value(cmd_name, return_type.strip())
...@@ -910,7 +934,7 @@ def get_entry_points(all_commands, commands, is_explicit_context, is_wgl, all_pa ...@@ -910,7 +934,7 @@ def get_entry_points(all_commands, commands, is_explicit_context, is_wgl, all_pa
decls.append( decls.append(
format_entry_point_decl(cmd_name, proto_text, param_text, is_explicit_context)) format_entry_point_decl(cmd_name, proto_text, param_text, is_explicit_context))
defs.append( defs.append(
format_entry_point_def(cmd_name, proto_text, param_text, is_explicit_context, format_entry_point_def(command, cmd_name, proto_text, param_text, is_explicit_context,
cmd_packed_gl_enums)) cmd_packed_gl_enums))
export_defs.append( export_defs.append(
......
...@@ -139,6 +139,9 @@ unsupported_enum_group_names = { ...@@ -139,6 +139,9 @@ unsupported_enum_group_names = {
'FenceConditionNV', 'FenceConditionNV',
'BufferPointerNameARB', 'BufferPointerNameARB',
'MatrixIndexPointerTypeARB', 'MatrixIndexPointerTypeARB',
'PointParameterNameARB',
'ClampColorTargetARB',
'ClampColorModeARB',
} }
......
...@@ -10,8 +10,6 @@ ...@@ -10,8 +10,6 @@
#include "libANGLE/gl_enum_utils_autogen.h" #include "libANGLE/gl_enum_utils_autogen.h"
#include <sstream>
#include "common/bitset_utils.h" #include "common/bitset_utils.h"
#include "common/debug.h" #include "common/debug.h"
...@@ -206,6 +204,19 @@ const char *GLenumToString(GLenumGroup enumGroup, unsigned int value) ...@@ -206,6 +204,19 @@ const char *GLenumToString(GLenumGroup enumGroup, unsigned int value)
} }
} }
case GLenumGroup::Boolean:
{
switch (value)
{
case 0x0:
return "GL_FALSE";
case 0x1:
return "GL_TRUE";
default:
return "EnumUnknown";
}
}
case GLenumGroup::Buffer: case GLenumGroup::Buffer:
{ {
switch (value) switch (value)
......
...@@ -11,8 +11,11 @@ ...@@ -11,8 +11,11 @@
#ifndef LIBANGLE_GL_ENUM_UTILS_AUTOGEN_H_ #ifndef LIBANGLE_GL_ENUM_UTILS_AUTOGEN_H_
#define LIBANGLE_GL_ENUM_UTILS_AUTOGEN_H_ #define LIBANGLE_GL_ENUM_UTILS_AUTOGEN_H_
#include <sstream>
#include <string> #include <string>
#include "common/PackedGLEnums_autogen.h"
namespace gl namespace gl
{ {
...@@ -221,6 +224,15 @@ const char *GLenumToString(GLenumGroup enumGroup, unsigned int value); ...@@ -221,6 +224,15 @@ const char *GLenumToString(GLenumGroup enumGroup, unsigned int value);
std::string GLbitfieldToString(GLenumGroup enumGroup, unsigned int value); std::string GLbitfieldToString(GLenumGroup enumGroup, unsigned int value);
template <typename T>
std::string PackedGLenumToString(GLenum packedEnum)
{
T internalTypeEnum = FromGLenum<T>(packedEnum);
std::stringstream st;
st << internalTypeEnum;
return st.str();
}
} // namespace gl } // namespace gl
#endif // LIBANGLE_GL_ENUM_UTILS_AUTOGEN_H_ #endif // LIBANGLE_GL_ENUM_UTILS_AUTOGEN_H_
...@@ -23,6 +23,10 @@ ...@@ -23,6 +23,10 @@
#include "libANGLE/validationGL12_autogen.h" #include "libANGLE/validationGL12_autogen.h"
#include "libGLESv2/global_state.h" #include "libGLESv2/global_state.h"
#if defined(ANGLE_TRACE_ENABLED)
# include "libANGLE/gl_enum_utils_autogen.h"
#endif
namespace gl namespace gl
{ {
void GL_APIENTRY CopyTexSubImage3D(GLenum target, void GL_APIENTRY CopyTexSubImage3D(GLenum target,
...@@ -36,9 +40,10 @@ void GL_APIENTRY CopyTexSubImage3D(GLenum target, ...@@ -36,9 +40,10 @@ void GL_APIENTRY CopyTexSubImage3D(GLenum target,
GLsizei height) GLsizei height)
{ {
EVENT( EVENT(
"(GLenum target = 0x%X, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLint " "(GLenum target = %s, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLint "
"zoffset = %d, GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d)", "zoffset = %d, GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d)",
target, level, xoffset, yoffset, zoffset, x, y, width, height); PackedGLenumToString<TextureTarget>(target).c_str(), level, xoffset, yoffset, zoffset, x, y,
width, height);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -65,9 +70,10 @@ void GL_APIENTRY DrawRangeElements(GLenum mode, ...@@ -65,9 +70,10 @@ void GL_APIENTRY DrawRangeElements(GLenum mode,
const void *indices) const void *indices)
{ {
EVENT( EVENT(
"(GLenum mode = 0x%X, GLuint start = %u, GLuint end = %u, GLsizei count = %d, GLenum type " "(GLenum mode = %s, GLuint start = %u, GLuint end = %u, GLsizei count = %d, GLenum type = "
"= 0x%X, const void *indices = 0x%016" PRIxPTR ")", "%s, const void *indices = 0x%016" PRIxPTR ")",
mode, start, end, count, type, (uintptr_t)indices); PackedGLenumToString<PrimitiveMode>(mode).c_str(), start, end, count,
PackedGLenumToString<DrawElementsType>(type).c_str(), (uintptr_t)indices);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -98,11 +104,12 @@ void GL_APIENTRY TexImage3D(GLenum target, ...@@ -98,11 +104,12 @@ void GL_APIENTRY TexImage3D(GLenum target,
const void *pixels) const void *pixels)
{ {
EVENT( EVENT(
"(GLenum target = 0x%X, GLint level = %d, GLint internalformat = %d, GLsizei width = %d, " "(GLenum target = %s, GLint level = %d, GLint internalformat = %d, GLsizei width = %d, "
"GLsizei height = %d, GLsizei depth = %d, GLint border = %d, GLenum format = 0x%X, GLenum " "GLsizei height = %d, GLsizei depth = %d, GLint border = %d, GLenum format = %s, GLenum "
"type = 0x%X, const void *pixels = 0x%016" PRIxPTR ")", "type = %s, const void *pixels = 0x%016" PRIxPTR ")",
target, level, internalformat, width, height, depth, border, format, type, PackedGLenumToString<TextureTarget>(target).c_str(), level, internalformat, width, height,
(uintptr_t)pixels); depth, border, GLenumToString(GLenumGroup::PixelFormat, format),
GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -134,11 +141,12 @@ void GL_APIENTRY TexSubImage3D(GLenum target, ...@@ -134,11 +141,12 @@ void GL_APIENTRY TexSubImage3D(GLenum target,
const void *pixels) const void *pixels)
{ {
EVENT( EVENT(
"(GLenum target = 0x%X, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLint " "(GLenum target = %s, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLint "
"zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, GLenum format " "zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, GLenum format "
"= 0x%X, GLenum type = 0x%X, const void *pixels = 0x%016" PRIxPTR ")", "= %s, GLenum type = %s, const void *pixels = 0x%016" PRIxPTR ")",
target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, PackedGLenumToString<TextureTarget>(target).c_str(), level, xoffset, yoffset, zoffset,
(uintptr_t)pixels); width, height, depth, GLenumToString(GLenumGroup::PixelFormat, format),
GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
......
...@@ -23,6 +23,10 @@ ...@@ -23,6 +23,10 @@
#include "libANGLE/validationGL14_autogen.h" #include "libANGLE/validationGL14_autogen.h"
#include "libGLESv2/global_state.h" #include "libGLESv2/global_state.h"
#if defined(ANGLE_TRACE_ENABLED)
# include "libANGLE/gl_enum_utils_autogen.h"
#endif
namespace gl namespace gl
{ {
void GL_APIENTRY BlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) void GL_APIENTRY BlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
...@@ -45,7 +49,7 @@ void GL_APIENTRY BlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat al ...@@ -45,7 +49,7 @@ void GL_APIENTRY BlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat al
void GL_APIENTRY BlendEquation(GLenum mode) void GL_APIENTRY BlendEquation(GLenum mode)
{ {
EVENT("(GLenum mode = 0x%X)", mode); EVENT("(GLenum mode = %s)", GLenumToString(GLenumGroup::BlendEquationModeEXT, mode));
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -65,9 +69,12 @@ void GL_APIENTRY BlendFuncSeparate(GLenum sfactorRGB, ...@@ -65,9 +69,12 @@ void GL_APIENTRY BlendFuncSeparate(GLenum sfactorRGB,
GLenum dfactorAlpha) GLenum dfactorAlpha)
{ {
EVENT( EVENT(
"(GLenum sfactorRGB = 0x%X, GLenum dfactorRGB = 0x%X, GLenum sfactorAlpha = 0x%X, GLenum " "(GLenum sfactorRGB = %s, GLenum dfactorRGB = %s, GLenum sfactorAlpha = %s, GLenum "
"dfactorAlpha = 0x%X)", "dfactorAlpha = %s)",
sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); GLenumToString(GLenumGroup::BlendingFactor, sfactorRGB),
GLenumToString(GLenumGroup::BlendingFactor, dfactorRGB),
GLenumToString(GLenumGroup::BlendingFactor, sfactorAlpha),
GLenumToString(GLenumGroup::BlendingFactor, dfactorAlpha));
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -86,8 +93,8 @@ void GL_APIENTRY BlendFuncSeparate(GLenum sfactorRGB, ...@@ -86,8 +93,8 @@ void GL_APIENTRY BlendFuncSeparate(GLenum sfactorRGB,
void GL_APIENTRY FogCoordPointer(GLenum type, GLsizei stride, const void *pointer) void GL_APIENTRY FogCoordPointer(GLenum type, GLsizei stride, const void *pointer)
{ {
EVENT("(GLenum type = 0x%X, GLsizei stride = %d, const void *pointer = 0x%016" PRIxPTR ")", EVENT("(GLenum type = %s, GLsizei stride = %d, const void *pointer = 0x%016" PRIxPTR ")",
type, stride, (uintptr_t)pointer); GLenumToString(GLenumGroup::FogPointerTypeEXT, type), stride, (uintptr_t)pointer);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -171,9 +178,10 @@ void GL_APIENTRY MultiDrawArrays(GLenum mode, ...@@ -171,9 +178,10 @@ void GL_APIENTRY MultiDrawArrays(GLenum mode,
const GLsizei *count, const GLsizei *count,
GLsizei drawcount) GLsizei drawcount)
{ {
EVENT("(GLenum mode = 0x%X, const GLint *first = 0x%016" PRIxPTR EVENT("(GLenum mode = %s, const GLint *first = 0x%016" PRIxPTR
", const GLsizei *count = 0x%016" PRIxPTR ", GLsizei drawcount = %d)", ", const GLsizei *count = 0x%016" PRIxPTR ", GLsizei drawcount = %d)",
mode, (uintptr_t)first, (uintptr_t)count, drawcount); PackedGLenumToString<PrimitiveMode>(mode).c_str(), (uintptr_t)first, (uintptr_t)count,
drawcount);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -195,10 +203,11 @@ void GL_APIENTRY MultiDrawElements(GLenum mode, ...@@ -195,10 +203,11 @@ void GL_APIENTRY MultiDrawElements(GLenum mode,
const void *const *indices, const void *const *indices,
GLsizei drawcount) GLsizei drawcount)
{ {
EVENT("(GLenum mode = 0x%X, const GLsizei *count = 0x%016" PRIxPTR EVENT("(GLenum mode = %s, const GLsizei *count = 0x%016" PRIxPTR
", GLenum type = 0x%X, const void *const*indices = 0x%016" PRIxPTR ", GLenum type = %s, const void *const*indices = 0x%016" PRIxPTR
", GLsizei drawcount = %d)", ", GLsizei drawcount = %d)",
mode, (uintptr_t)count, type, (uintptr_t)indices, drawcount); PackedGLenumToString<PrimitiveMode>(mode).c_str(), (uintptr_t)count,
PackedGLenumToString<DrawElementsType>(type).c_str(), (uintptr_t)indices, drawcount);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -219,7 +228,8 @@ void GL_APIENTRY MultiDrawElements(GLenum mode, ...@@ -219,7 +228,8 @@ void GL_APIENTRY MultiDrawElements(GLenum mode,
void GL_APIENTRY PointParameterf(GLenum pname, GLfloat param) void GL_APIENTRY PointParameterf(GLenum pname, GLfloat param)
{ {
EVENT("(GLenum pname = 0x%X, GLfloat param = %f)", pname, param); EVENT("(GLenum pname = %s, GLfloat param = %f)",
PackedGLenumToString<PointParameter>(pname).c_str(), param);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -237,8 +247,8 @@ void GL_APIENTRY PointParameterf(GLenum pname, GLfloat param) ...@@ -237,8 +247,8 @@ void GL_APIENTRY PointParameterf(GLenum pname, GLfloat param)
void GL_APIENTRY PointParameterfv(GLenum pname, const GLfloat *params) void GL_APIENTRY PointParameterfv(GLenum pname, const GLfloat *params)
{ {
EVENT("(GLenum pname = 0x%X, const GLfloat *params = 0x%016" PRIxPTR ")", pname, EVENT("(GLenum pname = %s, const GLfloat *params = 0x%016" PRIxPTR ")",
(uintptr_t)params); PackedGLenumToString<PointParameter>(pname).c_str(), (uintptr_t)params);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -256,7 +266,8 @@ void GL_APIENTRY PointParameterfv(GLenum pname, const GLfloat *params) ...@@ -256,7 +266,8 @@ void GL_APIENTRY PointParameterfv(GLenum pname, const GLfloat *params)
void GL_APIENTRY PointParameteri(GLenum pname, GLint param) void GL_APIENTRY PointParameteri(GLenum pname, GLint param)
{ {
EVENT("(GLenum pname = 0x%X, GLint param = %d)", pname, param); EVENT("(GLenum pname = %s, GLint param = %d)", GLenumToString(GLenumGroup::DefaultGroup, pname),
param);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -273,8 +284,8 @@ void GL_APIENTRY PointParameteri(GLenum pname, GLint param) ...@@ -273,8 +284,8 @@ void GL_APIENTRY PointParameteri(GLenum pname, GLint param)
void GL_APIENTRY PointParameteriv(GLenum pname, const GLint *params) void GL_APIENTRY PointParameteriv(GLenum pname, const GLint *params)
{ {
EVENT("(GLenum pname = 0x%X, const GLint *params = 0x%016" PRIxPTR ")", pname, EVENT("(GLenum pname = %s, const GLint *params = 0x%016" PRIxPTR ")",
(uintptr_t)params); GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -556,9 +567,9 @@ void GL_APIENTRY SecondaryColor3usv(const GLushort *v) ...@@ -556,9 +567,9 @@ void GL_APIENTRY SecondaryColor3usv(const GLushort *v)
void GL_APIENTRY SecondaryColorPointer(GLint size, GLenum type, GLsizei stride, const void *pointer) void GL_APIENTRY SecondaryColorPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
{ {
EVENT( EVENT(
"(GLint size = %d, GLenum type = 0x%X, GLsizei stride = %d, const void *pointer = " "(GLint size = %d, GLenum type = %s, GLsizei stride = %d, const void *pointer = "
"0x%016" PRIxPTR ")", "0x%016" PRIxPTR ")",
size, type, stride, (uintptr_t)pointer); size, GLenumToString(GLenumGroup::ColorPointerType, type), stride, (uintptr_t)pointer);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
......
...@@ -23,11 +23,16 @@ ...@@ -23,11 +23,16 @@
#include "libANGLE/validationGL15_autogen.h" #include "libANGLE/validationGL15_autogen.h"
#include "libGLESv2/global_state.h" #include "libGLESv2/global_state.h"
#if defined(ANGLE_TRACE_ENABLED)
# include "libANGLE/gl_enum_utils_autogen.h"
#endif
namespace gl namespace gl
{ {
void GL_APIENTRY BeginQuery(GLenum target, GLuint id) void GL_APIENTRY BeginQuery(GLenum target, GLuint id)
{ {
EVENT("(GLenum target = 0x%X, GLuint id = %u)", target, id); EVENT("(GLenum target = %s, GLuint id = %u)", PackedGLenumToString<QueryType>(target).c_str(),
id);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -45,7 +50,8 @@ void GL_APIENTRY BeginQuery(GLenum target, GLuint id) ...@@ -45,7 +50,8 @@ void GL_APIENTRY BeginQuery(GLenum target, GLuint id)
void GL_APIENTRY BindBuffer(GLenum target, GLuint buffer) void GL_APIENTRY BindBuffer(GLenum target, GLuint buffer)
{ {
EVENT("(GLenum target = 0x%X, GLuint buffer = %u)", target, buffer); EVENT("(GLenum target = %s, GLuint buffer = %u)",
PackedGLenumToString<BufferBinding>(target).c_str(), buffer);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -63,9 +69,11 @@ void GL_APIENTRY BindBuffer(GLenum target, GLuint buffer) ...@@ -63,9 +69,11 @@ void GL_APIENTRY BindBuffer(GLenum target, GLuint buffer)
void GL_APIENTRY BufferData(GLenum target, GLsizeiptr size, const void *data, GLenum usage) void GL_APIENTRY BufferData(GLenum target, GLsizeiptr size, const void *data, GLenum usage)
{ {
EVENT("(GLenum target = 0x%X, GLsizeiptr size = %llu, const void *data = 0x%016" PRIxPTR EVENT("(GLenum target = %s, GLsizeiptr size = %llu, const void *data = 0x%016" PRIxPTR
", GLenum usage = 0x%X)", ", GLenum usage = %s)",
target, static_cast<unsigned long long>(size), (uintptr_t)data, usage); PackedGLenumToString<BufferBinding>(target).c_str(),
static_cast<unsigned long long>(size), (uintptr_t)data,
PackedGLenumToString<BufferUsage>(usage).c_str());
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -85,9 +93,10 @@ void GL_APIENTRY BufferData(GLenum target, GLsizeiptr size, const void *data, GL ...@@ -85,9 +93,10 @@ void GL_APIENTRY BufferData(GLenum target, GLsizeiptr size, const void *data, GL
void GL_APIENTRY BufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void *data) void GL_APIENTRY BufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void *data)
{ {
EVENT( EVENT(
"(GLenum target = 0x%X, GLintptr offset = %llu, GLsizeiptr size = %llu, const void *data = " "(GLenum target = %s, GLintptr offset = %llu, GLsizeiptr size = %llu, const void *data = "
"0x%016" PRIxPTR ")", "0x%016" PRIxPTR ")",
target, static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size), PackedGLenumToString<BufferBinding>(target).c_str(),
static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size),
(uintptr_t)data); (uintptr_t)data);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -139,7 +148,7 @@ void GL_APIENTRY DeleteQueries(GLsizei n, const GLuint *ids) ...@@ -139,7 +148,7 @@ void GL_APIENTRY DeleteQueries(GLsizei n, const GLuint *ids)
void GL_APIENTRY EndQuery(GLenum target) void GL_APIENTRY EndQuery(GLenum target)
{ {
EVENT("(GLenum target = 0x%X)", target); EVENT("(GLenum target = %s)", PackedGLenumToString<QueryType>(target).c_str());
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -188,8 +197,9 @@ void GL_APIENTRY GenQueries(GLsizei n, GLuint *ids) ...@@ -188,8 +197,9 @@ void GL_APIENTRY GenQueries(GLsizei n, GLuint *ids)
void GL_APIENTRY GetBufferParameteriv(GLenum target, GLenum pname, GLint *params) void GL_APIENTRY GetBufferParameteriv(GLenum target, GLenum pname, GLint *params)
{ {
EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, GLint *params = 0x%016" PRIxPTR ")", target, EVENT("(GLenum target = %s, GLenum pname = %s, GLint *params = 0x%016" PRIxPTR ")",
pname, (uintptr_t)params); PackedGLenumToString<BufferBinding>(target).c_str(),
GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -207,8 +217,9 @@ void GL_APIENTRY GetBufferParameteriv(GLenum target, GLenum pname, GLint *params ...@@ -207,8 +217,9 @@ void GL_APIENTRY GetBufferParameteriv(GLenum target, GLenum pname, GLint *params
void GL_APIENTRY GetBufferPointerv(GLenum target, GLenum pname, void **params) void GL_APIENTRY GetBufferPointerv(GLenum target, GLenum pname, void **params)
{ {
EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, void **params = 0x%016" PRIxPTR ")", target, EVENT("(GLenum target = %s, GLenum pname = %s, void **params = 0x%016" PRIxPTR ")",
pname, (uintptr_t)params); PackedGLenumToString<BufferBinding>(target).c_str(),
GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -227,9 +238,10 @@ void GL_APIENTRY GetBufferPointerv(GLenum target, GLenum pname, void **params) ...@@ -227,9 +238,10 @@ void GL_APIENTRY GetBufferPointerv(GLenum target, GLenum pname, void **params)
void GL_APIENTRY GetBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, void *data) void GL_APIENTRY GetBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, void *data)
{ {
EVENT( EVENT(
"(GLenum target = 0x%X, GLintptr offset = %llu, GLsizeiptr size = %llu, void *data = " "(GLenum target = %s, GLintptr offset = %llu, GLsizeiptr size = %llu, void *data = "
"0x%016" PRIxPTR ")", "0x%016" PRIxPTR ")",
target, static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size), GLenumToString(GLenumGroup::BufferTargetARB, target),
static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size),
(uintptr_t)data); (uintptr_t)data);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
...@@ -247,8 +259,8 @@ void GL_APIENTRY GetBufferSubData(GLenum target, GLintptr offset, GLsizeiptr siz ...@@ -247,8 +259,8 @@ void GL_APIENTRY GetBufferSubData(GLenum target, GLintptr offset, GLsizeiptr siz
void GL_APIENTRY GetQueryObjectiv(GLuint id, GLenum pname, GLint *params) void GL_APIENTRY GetQueryObjectiv(GLuint id, GLenum pname, GLint *params)
{ {
EVENT("(GLuint id = %u, GLenum pname = 0x%X, GLint *params = 0x%016" PRIxPTR ")", id, pname, EVENT("(GLuint id = %u, GLenum pname = %s, GLint *params = 0x%016" PRIxPTR ")", id,
(uintptr_t)params); GLenumToString(GLenumGroup::QueryObjectParameterName, pname), (uintptr_t)params);
Context *context = GetGlobalContext(); Context *context = GetGlobalContext();
if (context) if (context)
...@@ -265,8 +277,8 @@ void GL_APIENTRY GetQueryObjectiv(GLuint id, GLenum pname, GLint *params) ...@@ -265,8 +277,8 @@ void GL_APIENTRY GetQueryObjectiv(GLuint id, GLenum pname, GLint *params)
void GL_APIENTRY GetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params) void GL_APIENTRY GetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params)
{ {
EVENT("(GLuint id = %u, GLenum pname = 0x%X, GLuint *params = 0x%016" PRIxPTR ")", id, pname, EVENT("(GLuint id = %u, GLenum pname = %s, GLuint *params = 0x%016" PRIxPTR ")", id,
(uintptr_t)params); GLenumToString(GLenumGroup::QueryObjectParameterName, pname), (uintptr_t)params);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -283,8 +295,9 @@ void GL_APIENTRY GetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params) ...@@ -283,8 +295,9 @@ void GL_APIENTRY GetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params)
void GL_APIENTRY GetQueryiv(GLenum target, GLenum pname, GLint *params) void GL_APIENTRY GetQueryiv(GLenum target, GLenum pname, GLint *params)
{ {
EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, GLint *params = 0x%016" PRIxPTR ")", target, EVENT("(GLenum target = %s, GLenum pname = %s, GLint *params = 0x%016" PRIxPTR ")",
pname, (uintptr_t)params); PackedGLenumToString<QueryType>(target).c_str(),
GLenumToString(GLenumGroup::QueryParameterName, pname), (uintptr_t)params);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -354,7 +367,9 @@ GLboolean GL_APIENTRY IsQuery(GLuint id) ...@@ -354,7 +367,9 @@ GLboolean GL_APIENTRY IsQuery(GLuint id)
void *GL_APIENTRY MapBuffer(GLenum target, GLenum access) void *GL_APIENTRY MapBuffer(GLenum target, GLenum access)
{ {
EVENT("(GLenum target = 0x%X, GLenum access = 0x%X)", target, access); EVENT("(GLenum target = %s, GLenum access = %s)",
PackedGLenumToString<BufferBinding>(target).c_str(),
GLenumToString(GLenumGroup::BufferAccessARB, access));
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
void *returnValue; void *returnValue;
...@@ -382,7 +397,7 @@ void *GL_APIENTRY MapBuffer(GLenum target, GLenum access) ...@@ -382,7 +397,7 @@ void *GL_APIENTRY MapBuffer(GLenum target, GLenum access)
GLboolean GL_APIENTRY UnmapBuffer(GLenum target) GLboolean GL_APIENTRY UnmapBuffer(GLenum target)
{ {
EVENT("(GLenum target = 0x%X)", target); EVENT("(GLenum target = %s)", PackedGLenumToString<BufferBinding>(target).c_str());
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
GLboolean returnValue; GLboolean returnValue;
......
...@@ -23,6 +23,10 @@ ...@@ -23,6 +23,10 @@
#include "libANGLE/validationGL2_autogen.h" #include "libANGLE/validationGL2_autogen.h"
#include "libGLESv2/global_state.h" #include "libGLESv2/global_state.h"
#if defined(ANGLE_TRACE_ENABLED)
# include "libANGLE/gl_enum_utils_autogen.h"
#endif
namespace gl namespace gl
{ {
void GL_APIENTRY AttachShader(GLuint program, GLuint shader) void GL_APIENTRY AttachShader(GLuint program, GLuint shader)
...@@ -62,7 +66,9 @@ void GL_APIENTRY BindAttribLocation(GLuint program, GLuint index, const GLchar * ...@@ -62,7 +66,9 @@ void GL_APIENTRY BindAttribLocation(GLuint program, GLuint index, const GLchar *
void GL_APIENTRY BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) void GL_APIENTRY BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
{ {
EVENT("(GLenum modeRGB = 0x%X, GLenum modeAlpha = 0x%X)", modeRGB, modeAlpha); EVENT("(GLenum modeRGB = %s, GLenum modeAlpha = %s)",
GLenumToString(GLenumGroup::BlendEquationModeEXT, modeRGB),
GLenumToString(GLenumGroup::BlendEquationModeEXT, modeAlpha));
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -121,7 +127,7 @@ GLuint GL_APIENTRY CreateProgram() ...@@ -121,7 +127,7 @@ GLuint GL_APIENTRY CreateProgram()
GLuint GL_APIENTRY CreateShader(GLenum type) GLuint GL_APIENTRY CreateShader(GLenum type)
{ {
EVENT("(GLenum type = 0x%X)", type); EVENT("(GLenum type = %s)", PackedGLenumToString<ShaderType>(type).c_str());
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
GLuint returnValue; GLuint returnValue;
...@@ -379,8 +385,8 @@ void GL_APIENTRY GetProgramInfoLog(GLuint program, ...@@ -379,8 +385,8 @@ void GL_APIENTRY GetProgramInfoLog(GLuint program,
void GL_APIENTRY GetProgramiv(GLuint program, GLenum pname, GLint *params) void GL_APIENTRY GetProgramiv(GLuint program, GLenum pname, GLint *params)
{ {
EVENT("(GLuint program = %u, GLenum pname = 0x%X, GLint *params = 0x%016" PRIxPTR ")", program, EVENT("(GLuint program = %u, GLenum pname = %s, GLint *params = 0x%016" PRIxPTR ")", program,
pname, (uintptr_t)params); GLenumToString(GLenumGroup::ProgramPropertyARB, pname), (uintptr_t)params);
Context *context = GetGlobalContext(); Context *context = GetGlobalContext();
if (context) if (context)
...@@ -435,8 +441,8 @@ void GL_APIENTRY GetShaderSource(GLuint shader, GLsizei bufSize, GLsizei *length ...@@ -435,8 +441,8 @@ void GL_APIENTRY GetShaderSource(GLuint shader, GLsizei bufSize, GLsizei *length
void GL_APIENTRY GetShaderiv(GLuint shader, GLenum pname, GLint *params) void GL_APIENTRY GetShaderiv(GLuint shader, GLenum pname, GLint *params)
{ {
EVENT("(GLuint shader = %u, GLenum pname = 0x%X, GLint *params = 0x%016" PRIxPTR ")", shader, EVENT("(GLuint shader = %u, GLenum pname = %s, GLint *params = 0x%016" PRIxPTR ")", shader,
pname, (uintptr_t)params); GLenumToString(GLenumGroup::ShaderParameterName, pname), (uintptr_t)params);
Context *context = GetGlobalContext(); Context *context = GetGlobalContext();
if (context) if (context)
...@@ -517,8 +523,8 @@ void GL_APIENTRY GetUniformiv(GLuint program, GLint location, GLint *params) ...@@ -517,8 +523,8 @@ void GL_APIENTRY GetUniformiv(GLuint program, GLint location, GLint *params)
void GL_APIENTRY GetVertexAttribPointerv(GLuint index, GLenum pname, void **pointer) void GL_APIENTRY GetVertexAttribPointerv(GLuint index, GLenum pname, void **pointer)
{ {
EVENT("(GLuint index = %u, GLenum pname = 0x%X, void **pointer = 0x%016" PRIxPTR ")", index, EVENT("(GLuint index = %u, GLenum pname = %s, void **pointer = 0x%016" PRIxPTR ")", index,
pname, (uintptr_t)pointer); GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)pointer);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -535,8 +541,8 @@ void GL_APIENTRY GetVertexAttribPointerv(GLuint index, GLenum pname, void **poin ...@@ -535,8 +541,8 @@ void GL_APIENTRY GetVertexAttribPointerv(GLuint index, GLenum pname, void **poin
void GL_APIENTRY GetVertexAttribdv(GLuint index, GLenum pname, GLdouble *params) void GL_APIENTRY GetVertexAttribdv(GLuint index, GLenum pname, GLdouble *params)
{ {
EVENT("(GLuint index = %u, GLenum pname = 0x%X, GLdouble *params = 0x%016" PRIxPTR ")", index, EVENT("(GLuint index = %u, GLenum pname = %s, GLdouble *params = 0x%016" PRIxPTR ")", index,
pname, (uintptr_t)params); GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -553,8 +559,8 @@ void GL_APIENTRY GetVertexAttribdv(GLuint index, GLenum pname, GLdouble *params) ...@@ -553,8 +559,8 @@ void GL_APIENTRY GetVertexAttribdv(GLuint index, GLenum pname, GLdouble *params)
void GL_APIENTRY GetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params) void GL_APIENTRY GetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params)
{ {
EVENT("(GLuint index = %u, GLenum pname = 0x%X, GLfloat *params = 0x%016" PRIxPTR ")", index, EVENT("(GLuint index = %u, GLenum pname = %s, GLfloat *params = 0x%016" PRIxPTR ")", index,
pname, (uintptr_t)params); GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -571,8 +577,8 @@ void GL_APIENTRY GetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params) ...@@ -571,8 +577,8 @@ void GL_APIENTRY GetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params)
void GL_APIENTRY GetVertexAttribiv(GLuint index, GLenum pname, GLint *params) void GL_APIENTRY GetVertexAttribiv(GLuint index, GLenum pname, GLint *params)
{ {
EVENT("(GLuint index = %u, GLenum pname = 0x%X, GLint *params = 0x%016" PRIxPTR ")", index, EVENT("(GLuint index = %u, GLenum pname = %s, GLint *params = 0x%016" PRIxPTR ")", index,
pname, (uintptr_t)params); GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -679,8 +685,9 @@ void GL_APIENTRY ShaderSource(GLuint shader, ...@@ -679,8 +685,9 @@ void GL_APIENTRY ShaderSource(GLuint shader,
void GL_APIENTRY StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) void GL_APIENTRY StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
{ {
EVENT("(GLenum face = 0x%X, GLenum func = 0x%X, GLint ref = %d, GLuint mask = %u)", face, func, EVENT("(GLenum face = %s, GLenum func = %s, GLint ref = %d, GLuint mask = %u)",
ref, mask); GLenumToString(GLenumGroup::StencilFaceDirection, face),
GLenumToString(GLenumGroup::StencilFunction, func), ref, mask);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -697,7 +704,8 @@ void GL_APIENTRY StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint ...@@ -697,7 +704,8 @@ void GL_APIENTRY StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint
void GL_APIENTRY StencilMaskSeparate(GLenum face, GLuint mask) void GL_APIENTRY StencilMaskSeparate(GLenum face, GLuint mask)
{ {
EVENT("(GLenum face = 0x%X, GLuint mask = %u)", face, mask); EVENT("(GLenum face = %s, GLuint mask = %u)",
GLenumToString(GLenumGroup::StencilFaceDirection, face), mask);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -714,8 +722,11 @@ void GL_APIENTRY StencilMaskSeparate(GLenum face, GLuint mask) ...@@ -714,8 +722,11 @@ void GL_APIENTRY StencilMaskSeparate(GLenum face, GLuint mask)
void GL_APIENTRY StencilOpSeparate(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass) void GL_APIENTRY StencilOpSeparate(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass)
{ {
EVENT("(GLenum face = 0x%X, GLenum sfail = 0x%X, GLenum dpfail = 0x%X, GLenum dppass = 0x%X)", EVENT("(GLenum face = %s, GLenum sfail = %s, GLenum dpfail = %s, GLenum dppass = %s)",
face, sfail, dpfail, dppass); GLenumToString(GLenumGroup::StencilFaceDirection, face),
GLenumToString(GLenumGroup::StencilOp, sfail),
GLenumToString(GLenumGroup::StencilOp, dpfail),
GLenumToString(GLenumGroup::StencilOp, dppass));
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -1019,9 +1030,9 @@ void GL_APIENTRY UniformMatrix2fv(GLint location, ...@@ -1019,9 +1030,9 @@ void GL_APIENTRY UniformMatrix2fv(GLint location,
const GLfloat *value) const GLfloat *value)
{ {
EVENT( EVENT(
"(GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, const GLfloat *value " "(GLint location = %d, GLsizei count = %d, GLboolean transpose = %s, const GLfloat *value "
"= 0x%016" PRIxPTR ")", "= 0x%016" PRIxPTR ")",
location, count, transpose, (uintptr_t)value); location, count, GLenumToString(GLenumGroup::Boolean, transpose), (uintptr_t)value);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -1042,9 +1053,9 @@ void GL_APIENTRY UniformMatrix3fv(GLint location, ...@@ -1042,9 +1053,9 @@ void GL_APIENTRY UniformMatrix3fv(GLint location,
const GLfloat *value) const GLfloat *value)
{ {
EVENT( EVENT(
"(GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, const GLfloat *value " "(GLint location = %d, GLsizei count = %d, GLboolean transpose = %s, const GLfloat *value "
"= 0x%016" PRIxPTR ")", "= 0x%016" PRIxPTR ")",
location, count, transpose, (uintptr_t)value); location, count, GLenumToString(GLenumGroup::Boolean, transpose), (uintptr_t)value);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -1065,9 +1076,9 @@ void GL_APIENTRY UniformMatrix4fv(GLint location, ...@@ -1065,9 +1076,9 @@ void GL_APIENTRY UniformMatrix4fv(GLint location,
const GLfloat *value) const GLfloat *value)
{ {
EVENT( EVENT(
"(GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, const GLfloat *value " "(GLint location = %d, GLsizei count = %d, GLboolean transpose = %s, const GLfloat *value "
"= 0x%016" PRIxPTR ")", "= 0x%016" PRIxPTR ")",
location, count, transpose, (uintptr_t)value); location, count, GLenumToString(GLenumGroup::Boolean, transpose), (uintptr_t)value);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -1735,9 +1746,10 @@ void GL_APIENTRY VertexAttribPointer(GLuint index, ...@@ -1735,9 +1746,10 @@ void GL_APIENTRY VertexAttribPointer(GLuint index,
const void *pointer) const void *pointer)
{ {
EVENT( EVENT(
"(GLuint index = %u, GLint size = %d, GLenum type = 0x%X, GLboolean normalized = %u, " "(GLuint index = %u, GLint size = %d, GLenum type = %s, GLboolean normalized = %s, GLsizei "
"GLsizei stride = %d, const void *pointer = 0x%016" PRIxPTR ")", "stride = %d, const void *pointer = 0x%016" PRIxPTR ")",
index, size, type, normalized, stride, (uintptr_t)pointer); index, size, PackedGLenumToString<VertexAttribType>(type).c_str(),
GLenumToString(GLenumGroup::Boolean, normalized), stride, (uintptr_t)pointer);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
......
...@@ -23,6 +23,10 @@ ...@@ -23,6 +23,10 @@
#include "libANGLE/validationGL21_autogen.h" #include "libANGLE/validationGL21_autogen.h"
#include "libGLESv2/global_state.h" #include "libGLESv2/global_state.h"
#if defined(ANGLE_TRACE_ENABLED)
# include "libANGLE/gl_enum_utils_autogen.h"
#endif
namespace gl namespace gl
{ {
void GL_APIENTRY UniformMatrix2x3fv(GLint location, void GL_APIENTRY UniformMatrix2x3fv(GLint location,
...@@ -31,9 +35,9 @@ void GL_APIENTRY UniformMatrix2x3fv(GLint location, ...@@ -31,9 +35,9 @@ void GL_APIENTRY UniformMatrix2x3fv(GLint location,
const GLfloat *value) const GLfloat *value)
{ {
EVENT( EVENT(
"(GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, const GLfloat *value " "(GLint location = %d, GLsizei count = %d, GLboolean transpose = %s, const GLfloat *value "
"= 0x%016" PRIxPTR ")", "= 0x%016" PRIxPTR ")",
location, count, transpose, (uintptr_t)value); location, count, GLenumToString(GLenumGroup::Boolean, transpose), (uintptr_t)value);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -54,9 +58,9 @@ void GL_APIENTRY UniformMatrix2x4fv(GLint location, ...@@ -54,9 +58,9 @@ void GL_APIENTRY UniformMatrix2x4fv(GLint location,
const GLfloat *value) const GLfloat *value)
{ {
EVENT( EVENT(
"(GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, const GLfloat *value " "(GLint location = %d, GLsizei count = %d, GLboolean transpose = %s, const GLfloat *value "
"= 0x%016" PRIxPTR ")", "= 0x%016" PRIxPTR ")",
location, count, transpose, (uintptr_t)value); location, count, GLenumToString(GLenumGroup::Boolean, transpose), (uintptr_t)value);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -77,9 +81,9 @@ void GL_APIENTRY UniformMatrix3x2fv(GLint location, ...@@ -77,9 +81,9 @@ void GL_APIENTRY UniformMatrix3x2fv(GLint location,
const GLfloat *value) const GLfloat *value)
{ {
EVENT( EVENT(
"(GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, const GLfloat *value " "(GLint location = %d, GLsizei count = %d, GLboolean transpose = %s, const GLfloat *value "
"= 0x%016" PRIxPTR ")", "= 0x%016" PRIxPTR ")",
location, count, transpose, (uintptr_t)value); location, count, GLenumToString(GLenumGroup::Boolean, transpose), (uintptr_t)value);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -100,9 +104,9 @@ void GL_APIENTRY UniformMatrix3x4fv(GLint location, ...@@ -100,9 +104,9 @@ void GL_APIENTRY UniformMatrix3x4fv(GLint location,
const GLfloat *value) const GLfloat *value)
{ {
EVENT( EVENT(
"(GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, const GLfloat *value " "(GLint location = %d, GLsizei count = %d, GLboolean transpose = %s, const GLfloat *value "
"= 0x%016" PRIxPTR ")", "= 0x%016" PRIxPTR ")",
location, count, transpose, (uintptr_t)value); location, count, GLenumToString(GLenumGroup::Boolean, transpose), (uintptr_t)value);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -123,9 +127,9 @@ void GL_APIENTRY UniformMatrix4x2fv(GLint location, ...@@ -123,9 +127,9 @@ void GL_APIENTRY UniformMatrix4x2fv(GLint location,
const GLfloat *value) const GLfloat *value)
{ {
EVENT( EVENT(
"(GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, const GLfloat *value " "(GLint location = %d, GLsizei count = %d, GLboolean transpose = %s, const GLfloat *value "
"= 0x%016" PRIxPTR ")", "= 0x%016" PRIxPTR ")",
location, count, transpose, (uintptr_t)value); location, count, GLenumToString(GLenumGroup::Boolean, transpose), (uintptr_t)value);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -146,9 +150,9 @@ void GL_APIENTRY UniformMatrix4x3fv(GLint location, ...@@ -146,9 +150,9 @@ void GL_APIENTRY UniformMatrix4x3fv(GLint location,
const GLfloat *value) const GLfloat *value)
{ {
EVENT( EVENT(
"(GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, const GLfloat *value " "(GLint location = %d, GLsizei count = %d, GLboolean transpose = %s, const GLfloat *value "
"= 0x%016" PRIxPTR ")", "= 0x%016" PRIxPTR ")",
location, count, transpose, (uintptr_t)value); location, count, GLenumToString(GLenumGroup::Boolean, transpose), (uintptr_t)value);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
......
...@@ -23,6 +23,10 @@ ...@@ -23,6 +23,10 @@
#include "libANGLE/validationGL31_autogen.h" #include "libANGLE/validationGL31_autogen.h"
#include "libGLESv2/global_state.h" #include "libGLESv2/global_state.h"
#if defined(ANGLE_TRACE_ENABLED)
# include "libANGLE/gl_enum_utils_autogen.h"
#endif
namespace gl namespace gl
{ {
void GL_APIENTRY CopyBufferSubData(GLenum readTarget, void GL_APIENTRY CopyBufferSubData(GLenum readTarget,
...@@ -32,10 +36,12 @@ void GL_APIENTRY CopyBufferSubData(GLenum readTarget, ...@@ -32,10 +36,12 @@ void GL_APIENTRY CopyBufferSubData(GLenum readTarget,
GLsizeiptr size) GLsizeiptr size)
{ {
EVENT( EVENT(
"(GLenum readTarget = 0x%X, GLenum writeTarget = 0x%X, GLintptr readOffset = %llu, " "(GLenum readTarget = %s, GLenum writeTarget = %s, GLintptr readOffset = %llu, GLintptr "
"GLintptr writeOffset = %llu, GLsizeiptr size = %llu)", "writeOffset = %llu, GLsizeiptr size = %llu)",
readTarget, writeTarget, static_cast<unsigned long long>(readOffset), PackedGLenumToString<BufferBinding>(readTarget).c_str(),
static_cast<unsigned long long>(writeOffset), static_cast<unsigned long long>(size)); PackedGLenumToString<BufferBinding>(writeTarget).c_str(),
static_cast<unsigned long long>(readOffset), static_cast<unsigned long long>(writeOffset),
static_cast<unsigned long long>(size));
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -57,8 +63,8 @@ void GL_APIENTRY CopyBufferSubData(GLenum readTarget, ...@@ -57,8 +63,8 @@ void GL_APIENTRY CopyBufferSubData(GLenum readTarget,
void GL_APIENTRY DrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instancecount) void GL_APIENTRY DrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instancecount)
{ {
EVENT("(GLenum mode = 0x%X, GLint first = %d, GLsizei count = %d, GLsizei instancecount = %d)", EVENT("(GLenum mode = %s, GLint first = %d, GLsizei count = %d, GLsizei instancecount = %d)",
mode, first, count, instancecount); PackedGLenumToString<PrimitiveMode>(mode).c_str(), first, count, instancecount);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -83,9 +89,10 @@ void GL_APIENTRY DrawElementsInstanced(GLenum mode, ...@@ -83,9 +89,10 @@ void GL_APIENTRY DrawElementsInstanced(GLenum mode,
GLsizei instancecount) GLsizei instancecount)
{ {
EVENT( EVENT(
"(GLenum mode = 0x%X, GLsizei count = %d, GLenum type = 0x%X, const void *indices = " "(GLenum mode = %s, GLsizei count = %d, GLenum type = %s, const void *indices = "
"0x%016" PRIxPTR ", GLsizei instancecount = %d)", "0x%016" PRIxPTR ", GLsizei instancecount = %d)",
mode, count, type, (uintptr_t)indices, instancecount); PackedGLenumToString<PrimitiveMode>(mode).c_str(), count,
PackedGLenumToString<DrawElementsType>(type).c_str(), (uintptr_t)indices, instancecount);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -137,9 +144,10 @@ void GL_APIENTRY GetActiveUniformBlockiv(GLuint program, ...@@ -137,9 +144,10 @@ void GL_APIENTRY GetActiveUniformBlockiv(GLuint program,
GLint *params) GLint *params)
{ {
EVENT( EVENT(
"(GLuint program = %u, GLuint uniformBlockIndex = %u, GLenum pname = 0x%X, GLint *params = " "(GLuint program = %u, GLuint uniformBlockIndex = %u, GLenum pname = %s, GLint *params = "
"0x%016" PRIxPTR ")", "0x%016" PRIxPTR ")",
program, uniformBlockIndex, pname, (uintptr_t)params); program, uniformBlockIndex, GLenumToString(GLenumGroup::UniformBlockPName, pname),
(uintptr_t)params);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -190,8 +198,9 @@ void GL_APIENTRY GetActiveUniformsiv(GLuint program, ...@@ -190,8 +198,9 @@ void GL_APIENTRY GetActiveUniformsiv(GLuint program,
{ {
EVENT( EVENT(
"(GLuint program = %u, GLsizei uniformCount = %d, const GLuint *uniformIndices = " "(GLuint program = %u, GLsizei uniformCount = %d, const GLuint *uniformIndices = "
"0x%016" PRIxPTR ", GLenum pname = 0x%X, GLint *params = 0x%016" PRIxPTR ")", "0x%016" PRIxPTR ", GLenum pname = %s, GLint *params = 0x%016" PRIxPTR ")",
program, uniformCount, (uintptr_t)uniformIndices, pname, (uintptr_t)params); program, uniformCount, (uintptr_t)uniformIndices,
GLenumToString(GLenumGroup::UniformPName, pname), (uintptr_t)params);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -281,8 +290,9 @@ void GL_APIENTRY PrimitiveRestartIndex(GLuint index) ...@@ -281,8 +290,9 @@ void GL_APIENTRY PrimitiveRestartIndex(GLuint index)
void GL_APIENTRY TexBuffer(GLenum target, GLenum internalformat, GLuint buffer) void GL_APIENTRY TexBuffer(GLenum target, GLenum internalformat, GLuint buffer)
{ {
EVENT("(GLenum target = 0x%X, GLenum internalformat = 0x%X, GLuint buffer = %u)", target, EVENT("(GLenum target = %s, GLenum internalformat = %s, GLuint buffer = %u)",
internalformat, buffer); GLenumToString(GLenumGroup::TextureTarget, target),
GLenumToString(GLenumGroup::InternalFormat, internalformat), buffer);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
......
...@@ -23,6 +23,10 @@ ...@@ -23,6 +23,10 @@
#include "libANGLE/validationGL42_autogen.h" #include "libANGLE/validationGL42_autogen.h"
#include "libGLESv2/global_state.h" #include "libGLESv2/global_state.h"
#if defined(ANGLE_TRACE_ENABLED)
# include "libANGLE/gl_enum_utils_autogen.h"
#endif
namespace gl namespace gl
{ {
void GL_APIENTRY BindImageTexture(GLuint unit, void GL_APIENTRY BindImageTexture(GLuint unit,
...@@ -34,9 +38,11 @@ void GL_APIENTRY BindImageTexture(GLuint unit, ...@@ -34,9 +38,11 @@ void GL_APIENTRY BindImageTexture(GLuint unit,
GLenum format) GLenum format)
{ {
EVENT( EVENT(
"(GLuint unit = %u, GLuint texture = %u, GLint level = %d, GLboolean layered = %u, GLint " "(GLuint unit = %u, GLuint texture = %u, GLint level = %d, GLboolean layered = %s, GLint "
"layer = %d, GLenum access = 0x%X, GLenum format = 0x%X)", "layer = %d, GLenum access = %s, GLenum format = %s)",
unit, texture, level, layered, layer, access, format); unit, texture, level, GLenumToString(GLenumGroup::Boolean, layered), layer,
GLenumToString(GLenumGroup::BufferAccessARB, access),
GLenumToString(GLenumGroup::InternalFormat, format));
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -60,9 +66,10 @@ void GL_APIENTRY DrawArraysInstancedBaseInstance(GLenum mode, ...@@ -60,9 +66,10 @@ void GL_APIENTRY DrawArraysInstancedBaseInstance(GLenum mode,
GLuint baseinstance) GLuint baseinstance)
{ {
EVENT( EVENT(
"(GLenum mode = 0x%X, GLint first = %d, GLsizei count = %d, GLsizei instancecount = %d, " "(GLenum mode = %s, GLint first = %d, GLsizei count = %d, GLsizei instancecount = %d, "
"GLuint baseinstance = %u)", "GLuint baseinstance = %u)",
mode, first, count, instancecount, baseinstance); GLenumToString(GLenumGroup::PrimitiveType, mode), first, count, instancecount,
baseinstance);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -88,9 +95,11 @@ void GL_APIENTRY DrawElementsInstancedBaseInstance(GLenum mode, ...@@ -88,9 +95,11 @@ void GL_APIENTRY DrawElementsInstancedBaseInstance(GLenum mode,
GLuint baseinstance) GLuint baseinstance)
{ {
EVENT( EVENT(
"(GLenum mode = 0x%X, GLsizei count = %d, GLenum type = 0x%X, const void *indices = " "(GLenum mode = %s, GLsizei count = %d, GLenum type = %s, const void *indices = "
"0x%016" PRIxPTR ", GLsizei instancecount = %d, GLuint baseinstance = %u)", "0x%016" PRIxPTR ", GLsizei instancecount = %d, GLuint baseinstance = %u)",
mode, count, type, (uintptr_t)indices, instancecount, baseinstance); GLenumToString(GLenumGroup::PrimitiveType, mode), count,
GLenumToString(GLenumGroup::PrimitiveType, type), (uintptr_t)indices, instancecount,
baseinstance);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -117,10 +126,12 @@ void GL_APIENTRY DrawElementsInstancedBaseVertexBaseInstance(GLenum mode, ...@@ -117,10 +126,12 @@ void GL_APIENTRY DrawElementsInstancedBaseVertexBaseInstance(GLenum mode,
GLuint baseinstance) GLuint baseinstance)
{ {
EVENT( EVENT(
"(GLenum mode = 0x%X, GLsizei count = %d, GLenum type = 0x%X, const void *indices = " "(GLenum mode = %s, GLsizei count = %d, GLenum type = %s, const void *indices = "
"0x%016" PRIxPTR "0x%016" PRIxPTR
", GLsizei instancecount = %d, GLint basevertex = %d, GLuint baseinstance = %u)", ", GLsizei instancecount = %d, GLint basevertex = %d, GLuint baseinstance = %u)",
mode, count, type, (uintptr_t)indices, instancecount, basevertex, baseinstance); GLenumToString(GLenumGroup::PrimitiveType, mode), count,
GLenumToString(GLenumGroup::PrimitiveType, type), (uintptr_t)indices, instancecount,
basevertex, baseinstance);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -141,8 +152,8 @@ void GL_APIENTRY DrawElementsInstancedBaseVertexBaseInstance(GLenum mode, ...@@ -141,8 +152,8 @@ void GL_APIENTRY DrawElementsInstancedBaseVertexBaseInstance(GLenum mode,
void GL_APIENTRY DrawTransformFeedbackInstanced(GLenum mode, GLuint id, GLsizei instancecount) void GL_APIENTRY DrawTransformFeedbackInstanced(GLenum mode, GLuint id, GLsizei instancecount)
{ {
EVENT("(GLenum mode = 0x%X, GLuint id = %u, GLsizei instancecount = %d)", mode, id, EVENT("(GLenum mode = %s, GLuint id = %u, GLsizei instancecount = %d)",
instancecount); GLenumToString(GLenumGroup::PrimitiveType, mode), id, instancecount);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -163,8 +174,8 @@ void GL_APIENTRY DrawTransformFeedbackStreamInstanced(GLenum mode, ...@@ -163,8 +174,8 @@ void GL_APIENTRY DrawTransformFeedbackStreamInstanced(GLenum mode,
GLuint stream, GLuint stream,
GLsizei instancecount) GLsizei instancecount)
{ {
EVENT("(GLenum mode = 0x%X, GLuint id = %u, GLuint stream = %u, GLsizei instancecount = %d)", EVENT("(GLenum mode = %s, GLuint id = %u, GLuint stream = %u, GLsizei instancecount = %d)",
mode, id, stream, instancecount); GLenumToString(GLenumGroup::PrimitiveType, mode), id, stream, instancecount);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -187,9 +198,10 @@ void GL_APIENTRY GetActiveAtomicCounterBufferiv(GLuint program, ...@@ -187,9 +198,10 @@ void GL_APIENTRY GetActiveAtomicCounterBufferiv(GLuint program,
GLint *params) GLint *params)
{ {
EVENT( EVENT(
"(GLuint program = %u, GLuint bufferIndex = %u, GLenum pname = 0x%X, GLint *params = " "(GLuint program = %u, GLuint bufferIndex = %u, GLenum pname = %s, GLint *params = "
"0x%016" PRIxPTR ")", "0x%016" PRIxPTR ")",
program, bufferIndex, pname, (uintptr_t)params); program, bufferIndex, GLenumToString(GLenumGroup::AtomicCounterBufferPName, pname),
(uintptr_t)params);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -213,9 +225,11 @@ void GL_APIENTRY GetInternalformativ(GLenum target, ...@@ -213,9 +225,11 @@ void GL_APIENTRY GetInternalformativ(GLenum target,
GLint *params) GLint *params)
{ {
EVENT( EVENT(
"(GLenum target = 0x%X, GLenum internalformat = 0x%X, GLenum pname = 0x%X, GLsizei bufSize " "(GLenum target = %s, GLenum internalformat = %s, GLenum pname = %s, GLsizei bufSize = %d, "
"= %d, GLint *params = 0x%016" PRIxPTR ")", "GLint *params = 0x%016" PRIxPTR ")",
target, internalformat, pname, bufSize, (uintptr_t)params); GLenumToString(GLenumGroup::TextureTarget, target),
GLenumToString(GLenumGroup::InternalFormat, internalformat),
GLenumToString(GLenumGroup::InternalFormatPName, pname), bufSize, (uintptr_t)params);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -234,7 +248,8 @@ void GL_APIENTRY GetInternalformativ(GLenum target, ...@@ -234,7 +248,8 @@ void GL_APIENTRY GetInternalformativ(GLenum target,
void GL_APIENTRY MemoryBarrier(GLbitfield barriers) void GL_APIENTRY MemoryBarrier(GLbitfield barriers)
{ {
EVENT("(GLbitfield barriers = 0x%X)", barriers); EVENT("(GLbitfield barriers = %s)",
GLbitfieldToString(GLenumGroup::MemoryBarrierMask, barriers).c_str());
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -251,9 +266,9 @@ void GL_APIENTRY MemoryBarrier(GLbitfield barriers) ...@@ -251,9 +266,9 @@ void GL_APIENTRY MemoryBarrier(GLbitfield barriers)
void GL_APIENTRY TexStorage1D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) void GL_APIENTRY TexStorage1D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width)
{ {
EVENT( EVENT(
"(GLenum target = 0x%X, GLsizei levels = %d, GLenum internalformat = 0x%X, GLsizei width = " "(GLenum target = %s, GLsizei levels = %d, GLenum internalformat = %s, GLsizei width = %d)",
"%d)", GLenumToString(GLenumGroup::TextureTarget, target), levels,
target, levels, internalformat, width); GLenumToString(GLenumGroup::InternalFormat, internalformat), width);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -272,9 +287,10 @@ void GL_APIENTRY ...@@ -272,9 +287,10 @@ void GL_APIENTRY
TexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) TexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
{ {
EVENT( EVENT(
"(GLenum target = 0x%X, GLsizei levels = %d, GLenum internalformat = 0x%X, GLsizei width = " "(GLenum target = %s, GLsizei levels = %d, GLenum internalformat = %s, GLsizei width = %d, "
"%d, GLsizei height = %d)", "GLsizei height = %d)",
target, levels, internalformat, width, height); PackedGLenumToString<TextureType>(target).c_str(), levels,
GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -300,9 +316,10 @@ void GL_APIENTRY TexStorage3D(GLenum target, ...@@ -300,9 +316,10 @@ void GL_APIENTRY TexStorage3D(GLenum target,
GLsizei depth) GLsizei depth)
{ {
EVENT( EVENT(
"(GLenum target = 0x%X, GLsizei levels = %d, GLenum internalformat = 0x%X, GLsizei width = " "(GLenum target = %s, GLsizei levels = %d, GLenum internalformat = %s, GLsizei width = %d, "
"%d, GLsizei height = %d, GLsizei depth = %d)", "GLsizei height = %d, GLsizei depth = %d)",
target, levels, internalformat, width, height, depth); PackedGLenumToString<TextureType>(target).c_str(), levels,
GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height, depth);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
......
...@@ -23,14 +23,18 @@ ...@@ -23,14 +23,18 @@
#include "libANGLE/validationGL44_autogen.h" #include "libANGLE/validationGL44_autogen.h"
#include "libGLESv2/global_state.h" #include "libGLESv2/global_state.h"
#if defined(ANGLE_TRACE_ENABLED)
# include "libANGLE/gl_enum_utils_autogen.h"
#endif
namespace gl namespace gl
{ {
void GL_APIENTRY BindBuffersBase(GLenum target, GLuint first, GLsizei count, const GLuint *buffers) void GL_APIENTRY BindBuffersBase(GLenum target, GLuint first, GLsizei count, const GLuint *buffers)
{ {
EVENT( EVENT(
"(GLenum target = 0x%X, GLuint first = %u, GLsizei count = %d, const GLuint *buffers = " "(GLenum target = %s, GLuint first = %u, GLsizei count = %d, const GLuint *buffers = "
"0x%016" PRIxPTR ")", "0x%016" PRIxPTR ")",
target, first, count, (uintptr_t)buffers); GLenumToString(GLenumGroup::BufferTargetARB, target), first, count, (uintptr_t)buffers);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -53,10 +57,11 @@ void GL_APIENTRY BindBuffersRange(GLenum target, ...@@ -53,10 +57,11 @@ void GL_APIENTRY BindBuffersRange(GLenum target,
const GLsizeiptr *sizes) const GLsizeiptr *sizes)
{ {
EVENT( EVENT(
"(GLenum target = 0x%X, GLuint first = %u, GLsizei count = %d, const GLuint *buffers = " "(GLenum target = %s, GLuint first = %u, GLsizei count = %d, const GLuint *buffers = "
"0x%016" PRIxPTR ", const GLintptr *offsets = 0x%016" PRIxPTR "0x%016" PRIxPTR ", const GLintptr *offsets = 0x%016" PRIxPTR
", const GLsizeiptr *sizes = 0x%016" PRIxPTR ")", ", const GLsizeiptr *sizes = 0x%016" PRIxPTR ")",
target, first, count, (uintptr_t)buffers, (uintptr_t)offsets, (uintptr_t)sizes); GLenumToString(GLenumGroup::BufferTargetARB, target), first, count, (uintptr_t)buffers,
(uintptr_t)offsets, (uintptr_t)sizes);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -155,9 +160,11 @@ void GL_APIENTRY BindVertexBuffers(GLuint first, ...@@ -155,9 +160,11 @@ void GL_APIENTRY BindVertexBuffers(GLuint first,
void GL_APIENTRY BufferStorage(GLenum target, GLsizeiptr size, const void *data, GLbitfield flags) void GL_APIENTRY BufferStorage(GLenum target, GLsizeiptr size, const void *data, GLbitfield flags)
{ {
EVENT("(GLenum target = 0x%X, GLsizeiptr size = %llu, const void *data = 0x%016" PRIxPTR EVENT("(GLenum target = %s, GLsizeiptr size = %llu, const void *data = 0x%016" PRIxPTR
", GLbitfield flags = 0x%X)", ", GLbitfield flags = %s)",
target, static_cast<unsigned long long>(size), (uintptr_t)data, flags); GLenumToString(GLenumGroup::BufferStorageTarget, target),
static_cast<unsigned long long>(size), (uintptr_t)data,
GLbitfieldToString(GLenumGroup::MapBufferUsageMask, flags).c_str());
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -176,9 +183,10 @@ void GL_APIENTRY ...@@ -176,9 +183,10 @@ void GL_APIENTRY
ClearTexImage(GLuint texture, GLint level, GLenum format, GLenum type, const void *data) ClearTexImage(GLuint texture, GLint level, GLenum format, GLenum type, const void *data)
{ {
EVENT( EVENT(
"(GLuint texture = %u, GLint level = %d, GLenum format = 0x%X, GLenum type = 0x%X, const " "(GLuint texture = %u, GLint level = %d, GLenum format = %s, GLenum type = %s, const void "
"void *data = 0x%016" PRIxPTR ")", "*data = 0x%016" PRIxPTR ")",
texture, level, format, type, (uintptr_t)data); texture, level, GLenumToString(GLenumGroup::PixelFormat, format),
GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)data);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -208,9 +216,10 @@ void GL_APIENTRY ClearTexSubImage(GLuint texture, ...@@ -208,9 +216,10 @@ void GL_APIENTRY ClearTexSubImage(GLuint texture,
EVENT( EVENT(
"(GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLint " "(GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLint "
"zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, GLenum format " "zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, GLenum format "
"= 0x%X, GLenum type = 0x%X, const void *data = 0x%016" PRIxPTR ")", "= %s, GLenum type = %s, const void *data = 0x%016" PRIxPTR ")",
texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, texture, level, xoffset, yoffset, zoffset, width, height, depth,
(uintptr_t)data); GLenumToString(GLenumGroup::PixelFormat, format),
GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)data);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
......
...@@ -23,6 +23,10 @@ ...@@ -23,6 +23,10 @@
#include "libANGLE/validationGL46_autogen.h" #include "libANGLE/validationGL46_autogen.h"
#include "libGLESv2/global_state.h" #include "libGLESv2/global_state.h"
#if defined(ANGLE_TRACE_ENABLED)
# include "libANGLE/gl_enum_utils_autogen.h"
#endif
namespace gl namespace gl
{ {
void GL_APIENTRY MultiDrawArraysIndirectCount(GLenum mode, void GL_APIENTRY MultiDrawArraysIndirectCount(GLenum mode,
...@@ -31,10 +35,10 @@ void GL_APIENTRY MultiDrawArraysIndirectCount(GLenum mode, ...@@ -31,10 +35,10 @@ void GL_APIENTRY MultiDrawArraysIndirectCount(GLenum mode,
GLsizei maxdrawcount, GLsizei maxdrawcount,
GLsizei stride) GLsizei stride)
{ {
EVENT("(GLenum mode = 0x%X, const void *indirect = 0x%016" PRIxPTR EVENT("(GLenum mode = %s, const void *indirect = 0x%016" PRIxPTR
", GLintptr drawcount = %llu, GLsizei maxdrawcount = %d, GLsizei stride = %d)", ", GLintptr drawcount = %llu, GLsizei maxdrawcount = %d, GLsizei stride = %d)",
mode, (uintptr_t)indirect, static_cast<unsigned long long>(drawcount), maxdrawcount, GLenumToString(GLenumGroup::PrimitiveType, mode), (uintptr_t)indirect,
stride); static_cast<unsigned long long>(drawcount), maxdrawcount, stride);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
...@@ -58,10 +62,11 @@ void GL_APIENTRY MultiDrawElementsIndirectCount(GLenum mode, ...@@ -58,10 +62,11 @@ void GL_APIENTRY MultiDrawElementsIndirectCount(GLenum mode,
GLsizei maxdrawcount, GLsizei maxdrawcount,
GLsizei stride) GLsizei stride)
{ {
EVENT("(GLenum mode = 0x%X, GLenum type = 0x%X, const void *indirect = 0x%016" PRIxPTR EVENT("(GLenum mode = %s, GLenum type = %s, const void *indirect = 0x%016" PRIxPTR
", GLintptr drawcount = %llu, GLsizei maxdrawcount = %d, GLsizei stride = %d)", ", GLintptr drawcount = %llu, GLsizei maxdrawcount = %d, GLsizei stride = %d)",
mode, type, (uintptr_t)indirect, static_cast<unsigned long long>(drawcount), maxdrawcount, GLenumToString(GLenumGroup::PrimitiveType, mode),
stride); GLenumToString(GLenumGroup::DefaultGroup, type), (uintptr_t)indirect,
static_cast<unsigned long long>(drawcount), maxdrawcount, stride);
Context *context = GetValidGlobalContext(); Context *context = GetValidGlobalContext();
if (context) if (context)
......
...@@ -304,6 +304,8 @@ libangle_sources = [ ...@@ -304,6 +304,8 @@ libangle_sources = [
"src/libANGLE/format_map_desktop.cpp", "src/libANGLE/format_map_desktop.cpp",
"src/libANGLE/formatutils.cpp", "src/libANGLE/formatutils.cpp",
"src/libANGLE/formatutils.h", "src/libANGLE/formatutils.h",
"src/libANGLE/gl_enum_utils_autogen.cpp",
"src/libANGLE/gl_enum_utils_autogen.h",
"src/libANGLE/histogram_macros.h", "src/libANGLE/histogram_macros.h",
"src/libANGLE/queryconversions.cpp", "src/libANGLE/queryconversions.cpp",
"src/libANGLE/queryconversions.h", "src/libANGLE/queryconversions.h",
...@@ -923,7 +925,6 @@ libangle_sources += [ ...@@ -923,7 +925,6 @@ libangle_sources += [
"src/libANGLE/capture_gles_3_1_autogen.h", "src/libANGLE/capture_gles_3_1_autogen.h",
"src/libANGLE/capture_gles_ext_autogen.h", "src/libANGLE/capture_gles_ext_autogen.h",
"src/libANGLE/frame_capture_utils_autogen.h", "src/libANGLE/frame_capture_utils_autogen.h",
"src/libANGLE/gl_enum_utils_autogen.h",
] ]
libangle_capture_sources = [ libangle_capture_sources = [
...@@ -938,7 +939,6 @@ libangle_capture_sources = [ ...@@ -938,7 +939,6 @@ libangle_capture_sources = [
"src/libANGLE/capture_gles_3_1_params.cpp", "src/libANGLE/capture_gles_3_1_params.cpp",
"src/libANGLE/capture_gles_ext_autogen.cpp", "src/libANGLE/capture_gles_ext_autogen.cpp",
"src/libANGLE/capture_gles_ext_params.cpp", "src/libANGLE/capture_gles_ext_params.cpp",
"src/libANGLE/gl_enum_utils_autogen.cpp",
"src/libANGLE/frame_capture_utils_autogen.cpp", "src/libANGLE/frame_capture_utils_autogen.cpp",
] ]
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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