[Mesa-dev] [RFC PATCH] mesa: Add MESA_SHADER_CAPTURE_PATH for writing .shader_test files.

Eero Tamminen eero.t.tamminen at intel.com
Tue Jan 19 04:03:46 PST 2016


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



More information about the mesa-dev mailing list