On Mon, Jan 18, 2016 at 6:12 PM, Eero Tamminen <eero.t.tammi...@intel.com> wrote: > Hi, > > On 18.01.2016 17:05, Kenneth Graunke wrote: >> >> This writes linked shader programs to .shader_test files to >> $MESA_SHADER_CAPTURE_PATH in the format used by shader-db >> (http://cgit.freedesktop.org/mesa/shader-db). >> >> It supports both GLSL shaders and ARB programs. All stages that >> are linked together are written in a single .shader_test file. >> >> This eliminates the need for shader-db's split-to-files.py, as Mesa >> produces the desired format directly. It's much more reliable than >> parsing stdout/stderr, as those may contain extraneous messages, or >> simply be closed by the application and unavailable. > > > It also has the advantage that if IDs get recycled, it will just overwrite > earlier file with the newer one, whereas split-to-files.py ignored later > shader using same ID. Shaders used e.g. for game menus and startup are less > interesting than ones used during gameplay. > > If one wants startup shaders not to be overwritten, one can just kill the > program at that point. One could also somewhat differentiate shaders to > different game stages (startup, menus, level 1, level 2....) by their file > time stamps.
Wait, are you saying that this capturing method will overwrite shaders sharing the same ID, leading to incomplete shader dumps? That's quite a showstopper in my opinion. The method we use is: ST_DUMP_SHADERS=file split-to-files.py file .. There is no editing required. Marek _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev