Mesa (master): NV fp parser: Support instruction and TEMP / OUTPUT sizes

Ian Romanick idr at kemper.freedesktop.org
Sat Sep 26 00:02:15 UTC 2009


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

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Fri Sep  4 17:27:27 2009 -0700

NV fp parser: Support instruction and TEMP / OUTPUT sizes

Adds support for declaring TEMP and OUTPUT variables as 'LONG' or
'SHORT' precision.  The precision specifiers are parsed, but they are
currently ignored.  Some support for this may be added in the future,
but neither Intel hardware nor, as far as I'm aware, Radeon hardware
support multiple precisions.

Also adds support for instruction precision ('X', 'H', and 'R')
suffixes and instruction condition code output ('C') suffix.  This
results in a fairly major change to the lexer.  Instructions are
matched with all the possible suffix strings.  The suffix string are
then carved off by a context (i.e., which program mode and options are
set) aware parser that converts the suffixes to bits in
prog_instruction.

This could have been handled in the same way _SAT was originally
handled in the lexer, but it would have resulted in a very large lexer
with lots of opportunity for cut-and-paste errors.

---

 src/mesa/shader/lex.yy.c              | 1874 +++++++++++++++------------------
 src/mesa/shader/program_lexer.l       |  194 ++--
 src/mesa/shader/program_parse.tab.c   |  776 ++++++++-------
 src/mesa/shader/program_parse.y       |   50 +-
 src/mesa/shader/program_parse_extra.c |   61 ++
 src/mesa/shader/program_parser.h      |   14 +
 6 files changed, 1463 insertions(+), 1506 deletions(-)

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



More information about the mesa-commit mailing list