mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 17:20:10 +01:00
vulkan/rmv: Only trace on the n-th frame
This makes it stop dumping on every n-th frame. It also uses a simple
increment, since the function is locked.
Fixes: defed48 ("vulkan: Add common RMV tracing infrastructure")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20635>
This commit is contained in:
parent
0b081731cb
commit
329e017300
1 changed files with 3 additions and 3 deletions
|
|
@ -92,9 +92,9 @@ vk_rmv_handle_present_locked(struct vk_device *device)
|
|||
}
|
||||
#endif
|
||||
|
||||
int32_t new_frame_index = p_atomic_add_return(&trace_data->cur_frame_idx, 1);
|
||||
frame_trigger =
|
||||
(new_frame_index % trace_data->trace_frame_idx == 0) && trace_data->trace_frame_idx != -1;
|
||||
frame_trigger = trace_data->cur_frame_idx == trace_data->trace_frame_idx;
|
||||
if (trace_data->cur_frame_idx <= trace_data->trace_frame_idx)
|
||||
trace_data->cur_frame_idx++;
|
||||
|
||||
if (file_trigger || frame_trigger)
|
||||
vk_dump_rmv_capture(trace_data);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue