Commit 5dafe107 by Jamie Madill Committed by Commit Bot

Output nullptr pointer parameters correctly.

Fix by piping all pointer value parameter output to const void *, which has a custom handler. This fixes a case where non-void pointers were being output as (nil) or other values. Fixes the Capture/Replay tests for many cases. Bug: angleproject:5249 Change-Id: I20c9e605d9c5a36e36e7a3d6c753a4e0de94ac4c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2497563 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com> Reviewed-by: 's avatarCourtney Goeltzenleuchter <courtneygo@google.com>
parent 21add124
......@@ -6,7 +6,7 @@
"scripts/entry_point_packed_gl_enums.json":
"2d46a38023361f8e95af71042626667c",
"scripts/generate_entry_points.py":
"abdb7540d76fdf0f109f4fcc48867870",
"75138689ccfce402b1ef5a048aa490d0",
"scripts/gl.xml":
"e74a595068cbdd6064300be1e71b7cc9",
"scripts/gl_angle_ext.xml":
......@@ -96,7 +96,7 @@
"src/libANGLE/frame_capture_replay_autogen.cpp":
"09901bfdd8b16c9e888380179b53aa7a",
"src/libANGLE/frame_capture_utils_autogen.cpp":
"7a4f16a96714e43faaa0bef299ad7028",
"f9f950fc4d7388a296cba84243c38afb",
"src/libANGLE/frame_capture_utils_autogen.h":
"86e368be9083fa542a08c1c143c8b87e",
"src/libANGLE/validationES1_autogen.h":
......
......@@ -688,8 +688,8 @@ template_init_param_value_case = """ case ParamType::T{enum}:
SetParamVal<ParamType::T{enum}>(valueIn, valueOut);
break;"""
template_write_param_type_to_stream_case = """ case ParamType::T{enum}:
WriteParamValueReplay<ParamType::T{enum}>(os, call, param.value.{union_name});
template_write_param_type_to_stream_case = """ case ParamType::T{enum_in}:
WriteParamValueReplay<ParamType::T{enum_out}>(os, call, param.value.{union_name});
break;"""
template_param_type_to_string_case = """ case ParamType::T{enum}:
......@@ -1433,8 +1433,10 @@ def format_init_param_value_case(param_type):
def format_write_param_type_to_stream_case(param_type):
# Force all enum printing to go through "const void *"
param_out = "voidConstPointer" if "Pointer" in param_type else param_type
return template_write_param_type_to_stream_case.format(
enum=param_type, union_name=get_param_type_union_name(param_type))
enum_in=param_type, enum_out=param_out, union_name=get_param_type_union_name(param_out))
def get_resource_id_types(all_param_types):
......
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