mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
tu: Include the CS binary sha1 in CS dispatch tracepoints.
This will help correlate from CS draw times back to the CS shader binaries for analysis. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35759>
This commit is contained in:
parent
e58f39fe2c
commit
cf0828debb
2 changed files with 13 additions and 4 deletions
|
|
@ -7805,7 +7805,8 @@ tu_dispatch(struct tu_cmd_buffer *cmd,
|
|||
}
|
||||
|
||||
if (info->indirect) {
|
||||
trace_start_compute_indirect(&cmd->trace, cs, cmd, info->unaligned);
|
||||
trace_start_compute_indirect(&cmd->trace, cs, cmd, info->unaligned,
|
||||
(char *)shader->variant->sha1_str);
|
||||
|
||||
if (info->unaligned) {
|
||||
tu_cs_emit_pkt7(cs, CP_RUN_OPENCL, 1);
|
||||
|
|
@ -7830,7 +7831,7 @@ tu_dispatch(struct tu_cmd_buffer *cmd,
|
|||
trace_start_compute(&cmd->trace, cs, cmd, info->indirect != 0,
|
||||
info->unaligned, local_size[0], local_size[1],
|
||||
local_size[2], info->blocks[0], info->blocks[1],
|
||||
info->blocks[2]);
|
||||
info->blocks[2], (char *)shader->variant->sha1_str);
|
||||
|
||||
if (info->unaligned) {
|
||||
tu_cs_emit_pkt7(cs, CP_EXEC_CS, 4);
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ from u_trace import utrace_generate_perfetto_utils
|
|||
|
||||
Header('vk_enum_to_str.h', scope=HeaderScope.SOURCE|HeaderScope.PERFETTO)
|
||||
Header('vk_format.h')
|
||||
Header('util/sha1/sha1.h')
|
||||
Header('tu_cmd_buffer.h', scope=HeaderScope.SOURCE)
|
||||
Header('tu_device.h', scope=HeaderScope.SOURCE)
|
||||
Header('common/freedreno_lrz.h')
|
||||
|
|
@ -37,6 +38,7 @@ ForwardDecl('struct tu_cmd_buffer')
|
|||
ForwardDecl('struct tu_device')
|
||||
ForwardDecl('struct tu_framebuffer')
|
||||
ForwardDecl('struct tu_tiling_config')
|
||||
ForwardDecl('typedef char tu_sha1_str[SHA1_DIGEST_STRING_LENGTH]')
|
||||
|
||||
# List of the default tracepoints enabled. By default tracepoints are enabled,
|
||||
# set tp_default_enabled=False to disable them by default.
|
||||
|
|
@ -168,10 +170,16 @@ begin_end_tp('compute',
|
|||
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')])
|
||||
Arg(type='uint16_t', var='num_groups_z', c_format='%u'),
|
||||
Arg(type='tu_sha1_str', var='cs_sha1',
|
||||
c_format='%s', copy_func='strcpy'),
|
||||
])
|
||||
|
||||
begin_end_tp('compute_indirect',
|
||||
args=[Arg(type='uint8_t', var='unaligned', c_format='%u')],
|
||||
args=[Arg(type='uint8_t', var='unaligned', c_format='%u'),
|
||||
Arg(type='tu_sha1_str', var='cs_sha1',
|
||||
c_format='%s', copy_func='strcpy'),
|
||||
],
|
||||
end_args=[ArgStruct(type='VkDispatchIndirectCommand', var='size',
|
||||
is_indirect=True, c_format="%ux%ux%u",
|
||||
fields=['x', 'y', 'z'])])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue