Example #1
0
def generate_code(args):
    from u_trace import utrace_generate
    from u_trace import utrace_generate_perfetto_utils

    utrace_generate(cpath=args.utrace_src, hpath=args.utrace_hdr,
                    ctx_param='struct intel_ds_device *dev')
    utrace_generate_perfetto_utils(hpath=args.perfetto_hdr)
Example #2
0
    args=[
        Arg(type='uint8_t', var='uses_3d_blit', c_format='%u'),
        Arg(type='enum VkFormat',
            var='src_format',
            c_format='%s',
            to_prim_type='vk_format_description({})->short_name'),
        Arg(type='enum VkFormat',
            var='dst_format',
            c_format='%s',
            to_prim_type='vk_format_description({})->short_name'),
        Arg(type='uint8_t', var='layers', c_format='%u')
    ])

begin_end_tp('compute',
             args=[
                 Arg(type='uint8_t', var='indirect', c_format='%u'),
                 Arg(type='uint16_t', var='local_size_x', c_format='%u'),
                 Arg(type='uint16_t', var='local_size_y', c_format='%u'),
                 Arg(type='uint16_t', var='local_size_z', c_format='%u'),
                 Arg(type='uint16_t', var='num_groups_x', c_format='%u'),
                 Arg(type='uint16_t', var='num_groups_y', c_format='%u'),
                 Arg(type='uint16_t', var='num_groups_z', c_format='%u')
             ])

utrace_generate(cpath=args.utrace_src,
                hpath=args.utrace_hdr,
                ctx_param='struct tu_device *dev',
                trace_toggle_name='tu_gpu_tracepoint',
                trace_toggle_defaults=tu_default_tps)
utrace_generate_perfetto_utils(hpath=args.perfetto_hdr)