Hi,

On 19.01.2016 13:07, Marek Olšák wrote:
On Mon, Jan 18, 2016 at 6:12 PM, Eero Tamminen
On 18.01.2016 17:05, Kenneth Graunke wrote:
[...]
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 old split-to-files.py overwrote the shaders too:
-----
if shadertuple in shaders[prognum]:
  print("Warning: duplicate", shadertype, " shader ", shadernum,
"in program", prognum, "...tossing old shader.")
shaders[prognum][shadertuple] = ''
-----

...except for ARB shaders where it just threw towel in on first shader
that re-used same ID:
-----
elif arbmatch:
  shadertype = arbmatch.group(1)
  prognum = arbmatch.group(2)
  if prognum in programs:
    print("dupe!")
    exit(1)
-----


The method we use is:
ST_DUMP_SHADERS=file
split-to-files.py file ..

There is no editing required.

At least with Intel backend there was a lot of extra lines that
split-to-files.py often left to the end of shaders, which required
manual cleanup.  Some time ago I posted a rewrite of split-to-files
which fixed that (among many other of its shortcomings):
http://lists.freedesktop.org/archives/mesa-dev/2015-December/102761.html


        - Eero

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to