aboutsummaryrefslogtreecommitdiff
path: root/src/mesa/drivers/verite/.gdbinit
blob: a735046fac83811e1b617c0ebeb9ff87d2747f73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# veritemesa perf-counter inspection helpers
#
# Requires libGL.a built with VERITE_INSTRUMENT=1 !
#
#   $ gdbserver :2345 ./glquake +timedemo demo1
#   $ gdb glquake
#   (gdb) target remote localhost:2345
#   (gdb) break vrMesaSwapBuffers
#   (gdb) run
#   (gdb) vrp
#   (gdb) vrpwatch

define vrp
  printf "VRPERF(live) frames=%llu\n", g_vrp.frames
  printf "  fallback: tex=%llu blend=%llu afunc=%llu zfunc=%llu\n", \
    g_vrp.fb[0], g_vrp.fb[1], g_vrp.fb[2], g_vrp.fb[3]
  printf "            stipple=%llu smooth=%llu twoside=%llu spec=%llu\n", \
    g_vrp.fb[4], g_vrp.fb[5], g_vrp.fb[6], g_vrp.fb[7]
  printf "            unfilled=%llu rmode=%llu texres=%llu alphagrad=%llu\n", \
    g_vrp.fb[8], g_vrp.fb[9], g_vrp.fb[10], g_vrp.fb[11]
  printf "  texval:   first=%llu evict=%llu dirty=%llu bindonly=%llu failv=%llu\n", \
    g_vrp.tv_first, g_vrp.tv_evict, g_vrp.tv_dirty, g_vrp.tv_bindonly, g_vrp.tv_failv
  printf "  churn:    fgcolor=%llu mipbind=%llu filt=%llu fences=%llu\n", \
    g_vrp.fgcolor_writes, g_vrp.mip_binds, g_vrp.filt_changes, g_vrp.fences
end
document vrp
Dump the veritemesa driver perf counters at the current stop.
end

# Break at each swap, print the counters, and keep going.
define vrpwatch
  break vrMesaSwapBuffers
  commands
    silent
    vrp
    continue
  end
end
document vrpwatch
Install a breakpoint at vrMesaSwapBuffers that prints g_vrp every frame.
end