Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions scripts/templates/validation/to_string.h.mako
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ inline std::string to_string(${th.make_type_name(n, tags, obj)} handle) {
return to_string(reinterpret_cast<const void*>(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<const void*>(ptr));
}

%endfor
%endif
%if n == 'ze':
Expand Down
9 changes: 9 additions & 0 deletions source/utils/ze_to_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,15 @@ inline std::string to_string(ze_rtas_parallel_operation_exp_handle_t handle) {
return to_string(reinterpret_cast<const void*>(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<const void*>(ptr));
}

inline std::string to_string(ze_rtas_geometry_aabbs_cb_exp_t ptr) {
return to_string(reinterpret_cast<const void*>(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); }
Expand Down
Loading