Mesa (master): i965: Make 'dw1' and 'bits' unnamed structures in brw_reg.

Matt Turner mattst88 at kemper.freedesktop.org
Fri Nov 13 19:58:06 UTC 2015


Module: Mesa
Branch: master
Commit: e42fb0c2a687cdcd6af2a590f6f5e24f64cfff3b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e42fb0c2a687cdcd6af2a590f6f5e24f64cfff3b

Author: Matt Turner <mattst88 at gmail.com>
Date:   Thu Oct 22 19:41:30 2015 -0700

i965: Make 'dw1' and 'bits' unnamed structures in brw_reg.

Generated by

   sed -i -e 's/\.bits\././g' *.c *.h *.cpp
   sed -i -e 's/dw1\.//g' *.c *.h *.cpp

and then reverting changes to comments in gen7_blorp.cpp and
brw_fs_generator.cpp.

There wasn't any utility offered by forcing the programmer to list these
to access their fields. Removing them will reduce churn in future
commits.

This is C11 (and gcc has apparently supported it for sometime
"compatibility with other compilers")

See https://gcc.gnu.org/onlinedocs/gcc/Unnamed-Fields.html

Reviewed-by: Emil Velikov <emil.velikov at collabora.co.uk>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/i965/brw_eu_emit.c            |   52 +++++++-------
 src/mesa/drivers/dri/i965/brw_ff_gs_emit.c         |    2 +-
 src/mesa/drivers/dri/i965/brw_fs.cpp               |   74 ++++++++++----------
 .../drivers/dri/i965/brw_fs_combine_constants.cpp  |    6 +-
 .../drivers/dri/i965/brw_fs_copy_propagation.cpp   |    8 +--
 src/mesa/drivers/dri/i965/brw_fs_cse.cpp           |   16 ++---
 src/mesa/drivers/dri/i965/brw_fs_generator.cpp     |   42 +++++------
 src/mesa/drivers/dri/i965/brw_fs_visitor.cpp       |    4 +-
 src/mesa/drivers/dri/i965/brw_reg.h                |   40 +++++------
 src/mesa/drivers/dri/i965/brw_shader.cpp           |   30 ++++----
 src/mesa/drivers/dri/i965/brw_vec4.cpp             |   40 +++++------
 .../drivers/dri/i965/brw_vec4_copy_propagation.cpp |    6 +-
 src/mesa/drivers/dri/i965/brw_vec4_generator.cpp   |   41 ++++++-----
 src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp     |    2 +-
 14 files changed, 185 insertions(+), 178 deletions(-)

Diff:   http://cgit.freedesktop.org/mesa/mesa/diff/?id=e42fb0c2a687cdcd6af2a590f6f5e24f64cfff3b



More information about the mesa-commit mailing list