[Mesa-dev] [PATCH 1/1] i965: Do not overwrite optimizer dumps

Eero Tamminen eero.t.tamminen at intel.com
Thu Nov 26 03:00:37 PST 2015


Hi,

On 11/25/2015 08:52 PM, Jason Ekstrand wrote:
> On Wed, Nov 25, 2015 at 10:49 AM, Kenneth Graunke <kenneth at whitecape.org> wrote:
[...]
>> It almost seems like you want a hash of the program key - and maybe a
>> file containing a printed copy of the key so you can identify which
>> program is which.
>>
>> Alternatively, one could use the address of the key with %p to obtain
>> a unique identifier.  That's easy and should solve the problem.
>
> Unfortunately, the pointer is non-deterministic so comparing from one
> run to another is going to be hard.  A quick-and-dirty hash of the key
> might work though.

Why not use the same path/file prefix & hash as what 
MESA_SHADER_DUMP_PATH feature does?

Then it's easy to match saved GLSL source to the optimizer output.

(Windows driver uses same shader source hash for identifying everything 
from GLSL source to intermediate representation to shader asm and I 
think that's the only sane way.)


	- Eero




More information about the mesa-dev mailing list