diff --git a/scripts/templates/validation/to_string.h.mako b/scripts/templates/validation/to_string.h.mako index 9bffefad..563197b2 100644 --- a/scripts/templates/validation/to_string.h.mako +++ b/scripts/templates/validation/to_string.h.mako @@ -58,6 +58,13 @@ inline std::string to_string(${th.make_type_name(n, tags, obj)} handle) { return to_string(reinterpret_cast(handle)); } +%endfor +// Callback to_string functions (function pointers) +%for obj in th.extract_objs(specs, r"callback"): +inline std::string to_string(${th.make_type_name(n, tags, obj)} ptr) { + return to_string(reinterpret_cast(ptr)); +} + %endfor %endif %if n == 'ze': diff --git a/source/utils/ze_to_string.h b/source/utils/ze_to_string.h index f4249198..73b14709 100644 --- a/source/utils/ze_to_string.h +++ b/source/utils/ze_to_string.h @@ -120,6 +120,15 @@ inline std::string to_string(ze_rtas_parallel_operation_exp_handle_t handle) { return to_string(reinterpret_cast(handle)); } +// Callback to_string functions (function pointers) +inline std::string to_string(ze_rtas_geometry_aabbs_cb_ext_t ptr) { + return to_string(reinterpret_cast(ptr)); +} + +inline std::string to_string(ze_rtas_geometry_aabbs_cb_exp_t ptr) { + return to_string(reinterpret_cast(ptr)); +} + // For primitive types and Level Zero typedef'd types // Since most Level Zero types are typedef'd to uint32_t, we can't distinguish them by type inline std::string to_string(uint32_t value) { return std::to_string(value); }