diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-01-11 20:28:02 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-01-11 20:28:02 +0100 |
commit | 0e5d9b52118ff0d770b09acbd8d9d912d85c990f (patch) | |
tree | 069af4463d00d5659ea3c52e50d02ea0a2cff231 /envytools | |
parent | 4a8f23d6cffe5cfb8def8ffaef9c99bdd7d33349 (diff) |
shorten state names, figure out some bits
- envytools: add more convenient VIVS_FE_VERTEX_ELEMENT_CONFIG_START(0xc) syntax
iso having to write (0xc << VIVS_FE_VERTEX_ELEMENT_CONFIG_START__SHIFT)
- figure out rs/depth tiling bits, PS bypass, write depth only
Diffstat (limited to 'envytools')
-rw-r--r-- | envytools/rnn/headergen.c | 11 | ||||
-rw-r--r-- | envytools/rnn/rnn.c | 4 |
2 files changed, 15 insertions, 0 deletions
diff --git a/envytools/rnn/headergen.c b/envytools/rnn/headergen.c index 4d2374d..79d81d9 100644 --- a/envytools/rnn/headergen.c +++ b/envytools/rnn/headergen.c @@ -87,6 +87,11 @@ void printdef (char *name, char *suf, int type, uint64_t val, char *file) { fprintf (dst, "#define %s__%s%n", name, suf, &len); else fprintf (dst, "#define %s%n", name, &len); + if (type == 2) + { + fprintf (dst, "(x)"); + len += 3; + } if (type == 0 && val > 0xffffffffull) seekcol (dst, len, startcol-8); else @@ -101,6 +106,9 @@ void printdef (char *name, char *suf, int type, uint64_t val, char *file) { case 1: fprintf (dst, "%"PRIu64"\n", val); break; + case 2: + fprintf (dst, "((x) << %"PRIu64")\n", val); + break; } } @@ -137,6 +145,9 @@ void printbitfield (struct rnnbitfield *bf, int shift) { } else { printdef (bf->fullname, "MASK", 0, bf->mask << shift, bf->file); printdef (bf->fullname, "SHIFT", 1, bf->low + shift, bf->file); + if (bf->typeinfo.type != RNN_TTYPE_INLINE_ENUM && bf->typeinfo.type != RNN_TTYPE_INLINE_BITSET) { + printdef (bf->fullname, 0, 2, bf->low + shift, bf->file); + } } printtypeinfo (&bf->typeinfo, bf->fullname, bf->low + shift, bf->file); } diff --git a/envytools/rnn/rnn.c b/envytools/rnn/rnn.c index 78e3010..a8259b3 100644 --- a/envytools/rnn/rnn.c +++ b/envytools/rnn/rnn.c @@ -411,6 +411,8 @@ static void parsebitset(struct rnndb *db, char *file, xmlNode *node) { variantsstr = strdup(getattrib(db, file, node->line, attr)); } else if (!strcmp(attr->name, "brief")) { // TODO + } else if (!strcmp(attr->name, "masked")) { + // TODO } else { fprintf (stderr, "%s:%d: wrong attribute \"%s\" for bitset\n", file, node->line, attr->name); db->estatus = 1; @@ -671,6 +673,8 @@ static void parsedomain(struct rnndb *db, char *file, xmlNode *node) { varsetstr = strdup(getattrib(db, file, node->line, attr)); } else if (!strcmp(attr->name, "variants")) { variantsstr = strdup(getattrib(db, file, node->line, attr)); + } else if (!strcmp(attr->name, "brief")) { + /* ignored */ } else { fprintf (stderr, "%s:%d: wrong attribute \"%s\" for domain\n", file, node->line, attr->name); db->estatus = 1; |