[Mesa-dev] [PATCH v4 2/6] mesa/st: glsl_to_tgsi: implement new temporary register lifetime tracker

Emil Velikov emil.l.velikov at gmail.com
Thu Jun 22 14:35:37 UTC 2017


Hi Gert,

A couple of trivial bits I've noticed in patches 2 and 3, but
applicable overall.

 - Unify if/return chains
I've seen the following three examples, sometimes even right next to each other.

if foo
   return f1;
if bar
   return b1;
return c1;

if foo
   return f1;
if bar
   return b1;
else
   return c1;

if foo
   return f1;
else if bar
   return b1;
return c1;

Personal fav. is the first one (with blank lines in between), although
regardless of the option do make sure code is consistent.

 - Braces for a single line statement in a if conditionals
Some instances have, while others don't. I think most people prefer
omitting them, although as long as you're consistent with surrounding
code it's fine.

- Tests still use STL?
Am I looking at the right patches - shouldn't be a big deal either way.

Regards,
Emil


More information about the mesa-dev mailing list