On 08/10/2015 09:15 AM, Rob Clark wrote: > From: Rob Clark <robcl...@freedesktop.org> > > Punch it through mesa and gallium, plus implementation in freedreno to > serve as an example. Radeon should be able to do a similar thing with > no-op packets. Not sure about other drivers.
The idea behind this extension (and the way the only other implementation of it works) is that the debug tool itself exposes it to the application without the driver knowing. This allows the developer to set breakpoints on certain messages, etc. Given that usage model, there may be applications that will start calling glStringMarkerGREMEDY as soon as the extension string is there. After all, you'll on see that in the debugger, so who cares about performance there, right? :( I think it would be better to not enable the extension by default. Maybe require a driconf option or debug context or something. > Plan to use this extension from apitrace, to emit call and frame #'s > for draw commands, so I can find the corresponding draw from cmdstream > dump (ie. to debug lockups, incorrect rendering, etc). Clever. :) I think the other way to do this would be to insert a fence with an object label. GLsync fence = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); glObjectPtrLabel(fence, 0, "call ### frame ###"); > Rob Clark (3): > mesa: add GREMEDY_string_marker > gallium: add GREMEDY_string_marker > freedreno: implement emit_string_marker > > src/gallium/docs/source/screen.rst | 1 + > src/gallium/drivers/freedreno/freedreno_context.c | 27 > +++++++++++++++++++++++ > src/gallium/drivers/freedreno/freedreno_screen.c | 1 + > src/gallium/drivers/i915/i915_screen.c | 1 + > src/gallium/drivers/ilo/ilo_screen.c | 1 + > src/gallium/drivers/llvmpipe/lp_screen.c | 1 + > src/gallium/drivers/nouveau/nv30/nv30_screen.c | 1 + > src/gallium/drivers/nouveau/nv50/nv50_screen.c | 1 + > src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 1 + > src/gallium/drivers/r300/r300_screen.c | 1 + > src/gallium/drivers/r600/r600_pipe.c | 1 + > src/gallium/drivers/radeonsi/si_pipe.c | 1 + > src/gallium/drivers/softpipe/sp_screen.c | 1 + > src/gallium/drivers/svga/svga_screen.c | 1 + > src/gallium/drivers/vc4/vc4_screen.c | 3 ++- > src/gallium/include/pipe/p_context.h | 7 ++++++ > src/gallium/include/pipe/p_defines.h | 1 + > src/mapi/glapi/gen/GREMEDY_string_marker.xml | 18 +++++++++++++++ > src/mapi/glapi/gen/Makefile.am | 1 + > src/mapi/glapi/gen/gl_API.xml | 2 ++ > src/mesa/main/dd.h | 6 +++++ > src/mesa/main/debug.c | 14 ++++++++++++ > src/mesa/main/debug.h | 3 +++ > src/mesa/main/extensions.c | 1 + > src/mesa/main/mtypes.h | 1 + > src/mesa/state_tracker/st_context.c | 9 ++++++++ > src/mesa/state_tracker/st_extensions.c | 1 + > 27 files changed, 106 insertions(+), 1 deletion(-) > create mode 100644 src/mapi/glapi/gen/GREMEDY_string_marker.xml _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev