mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 01:50:10 +01:00
freedreno/cffdec: Stop open-coding enum parsing
Now that rnndec_decode_enum() has been fixed, it does the same thing as this function. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6140>
This commit is contained in:
parent
73241ca53e
commit
8d0e5e0626
1 changed files with 1 additions and 13 deletions
|
|
@ -143,19 +143,7 @@ struct rnndecaddrinfo *rnn_reginfo(struct rnn *rnn, uint32_t regbase)
|
|||
|
||||
const char *rnn_enumname(struct rnn *rnn, const char *name, uint32_t val)
|
||||
{
|
||||
struct rnndeccontext *ctx = rnn->vc;
|
||||
struct rnnenum *en = rnn_findenum(ctx->db, name);
|
||||
if (en) {
|
||||
int i;
|
||||
for (i = 0; i < en->valsnum; i++) {
|
||||
struct rnnvalue *eval = en->vals[i];
|
||||
if (eval->valvalid && eval->value == val &&
|
||||
rnndec_varmatch(ctx, &eval->varinfo)) {
|
||||
return en->vals[i]->name;
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
return rnndec_decode_enum(rnn->vc, name, val);
|
||||
}
|
||||
|
||||
static struct rnndelem *regelem(struct rnndomain *domain, const char *name)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue