mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
freedreno/rnn: Make addvariant work for fields in the same reg
Previously if addvariant was processed after other fields in the reg these fields would never get matched. Fix this by moving bitfields that add variant to the beginning of the list. Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23881>
This commit is contained in:
parent
15db60fbbc
commit
dfe650f3f9
1 changed files with 12 additions and 1 deletions
|
|
@ -1224,8 +1224,19 @@ static void preptypeinfo(struct rnndb *db, struct rnntypeinfo *ti, char *prefix,
|
|||
if (ti->addvariant && ti->type != RNN_TTYPE_ENUM) {
|
||||
rnn_err(db, "%s: addvariant specified on non-enum type %s\n", prefix, ti->name);
|
||||
}
|
||||
for (i = 0; i < ti->bitfieldsnum; i++)
|
||||
for (i = 0; i < ti->bitfieldsnum; i++) {
|
||||
prepbitfield(db, ti->bitfields[i], prefix, vi);
|
||||
if (ti->bitfields[i]->typeinfo.addvariant) {
|
||||
for (int j = 0; j < i; j++) {
|
||||
if (!ti->bitfields[j]->typeinfo.addvariant) {
|
||||
struct rnnbitfield *t = ti->bitfields[j];
|
||||
ti->bitfields[j] = ti->bitfields[i];
|
||||
ti->bitfields[i] = t;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (i = 0; i < ti->valsnum; i++)
|
||||
prepvalue(db, ti->vals[i], prefix, vi);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue