# 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