[Mesa-dev] [PATCH 3/3] etnaviv: shader-db traces

Wladimir J. van der Laan laanwj at gmail.com
Thu Feb 9 12:50:41 UTC 2017


> > >>  /* shader object, for linking */
> > >>  struct etna_shader {
> > >> +   uint32_t id; /* for debug */
> > >
> > > Do you need this? It can certainly be removed from this patch, but I
> > > don't know if you have other stuff building on top of this.
> > >
> > 
> > It gets used in dump_shader_info(..) which was added with this patch.
> 
> My argument was that you could pass that value as an argument to
> dump_shader_info(). I don't see why it needs to be stored inside the
> etna_shader object.

One advantage of storing it is that debug logging that refers to the shader
can use the same number and it can be correlated with the info dumped earlier.

Not that that is part of this patch, but that seems to be the goal.

If not for that there's no real use for a counter anyway: just have whatever
parses the output do the counting based on what is printed first.

But I think it's fine as it is.

Wladimir


More information about the mesa-dev mailing list