mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 07:00:12 +01:00
freedreno/rnn: allow name to be optional in arrays
We are using unnamed arrays to describe repeating portions of a pm4 packet. So allow the name to be optional. Instead of just using the empty-string hack, drop the attribute. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6107>
This commit is contained in:
parent
e801069c1e
commit
14a7ca577f
4 changed files with 9 additions and 4 deletions
|
|
@ -833,7 +833,7 @@ opcode: CP_LOAD_STATE4 (30) (4 dwords)
|
||||||
</domain>
|
</domain>
|
||||||
|
|
||||||
<domain name="CP_SET_DRAW_STATE" width="32" varset="chip" variants="A4XX-">
|
<domain name="CP_SET_DRAW_STATE" width="32" varset="chip" variants="A4XX-">
|
||||||
<array offset="0" name="" stride="3" length="100">
|
<array offset="0" stride="3" length="100">
|
||||||
<reg32 offset="0" name="0">
|
<reg32 offset="0" name="0">
|
||||||
<bitfield name="COUNT" low="0" high="15" type="uint"/>
|
<bitfield name="COUNT" low="0" high="15" type="uint"/>
|
||||||
<bitfield name="DIRTY" pos="16" type="boolean"/>
|
<bitfield name="DIRTY" pos="16" type="boolean"/>
|
||||||
|
|
@ -1497,7 +1497,7 @@ opcode: CP_LOAD_STATE4 (30) (4 dwords)
|
||||||
<value value="3" name="NON_PRIV_SAVE_ADDR"/>
|
<value value="3" name="NON_PRIV_SAVE_ADDR"/>
|
||||||
<value value="4" name="COUNTER"/>
|
<value value="4" name="COUNTER"/>
|
||||||
</enum>
|
</enum>
|
||||||
<array offset="0" name="" stride="3" length="100">
|
<array offset="0" stride="3" length="100">
|
||||||
<reg32 offset="0" name="0">
|
<reg32 offset="0" name="0">
|
||||||
<bitfield name="PSEUDO_REG" low="0" high="2" type="pseudo_reg"/>
|
<bitfield name="PSEUDO_REG" low="0" high="2" type="pseudo_reg"/>
|
||||||
</reg32>
|
</reg32>
|
||||||
|
|
|
||||||
|
|
@ -227,7 +227,10 @@ class Bitset(object):
|
||||||
|
|
||||||
class Array(object):
|
class Array(object):
|
||||||
def __init__(self, attrs, domain):
|
def __init__(self, attrs, domain):
|
||||||
self.name = attrs["name"]
|
if "name" in attrs:
|
||||||
|
self.name = attrs["name"]
|
||||||
|
else:
|
||||||
|
self.name = ""
|
||||||
self.domain = domain
|
self.domain = domain
|
||||||
self.offset = int(attrs["offset"], 0)
|
self.offset = int(attrs["offset"], 0)
|
||||||
self.stride = int(attrs["stride"], 0)
|
self.stride = int(attrs["stride"], 0)
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,7 @@
|
||||||
<group ref="rng:topGroup" />
|
<group ref="rng:topGroup" />
|
||||||
<group ref="rng:regarrayGroup" />
|
<group ref="rng:regarrayGroup" />
|
||||||
</choice>
|
</choice>
|
||||||
<attribute name="name" type="NMTOKEN" use="required" />
|
<attribute name="name" type="NMTOKEN" use="optional" />
|
||||||
<attribute name="offset" type="rng:HexOrNumber" use="required" />
|
<attribute name="offset" type="rng:HexOrNumber" use="required" />
|
||||||
<attribute name="stride" type="rng:HexOrNumber" use="required" />
|
<attribute name="stride" type="rng:HexOrNumber" use="required" />
|
||||||
<attribute name="length" type="rng:HexOrNumber" use="required" />
|
<attribute name="length" type="rng:HexOrNumber" use="required" />
|
||||||
|
|
|
||||||
|
|
@ -481,6 +481,8 @@ static struct rnndelem *trydelem(struct rnndb *db, char *file, xmlNode *node) {
|
||||||
return res;
|
return res;
|
||||||
} else if (!strcmp(node->name, "stripe") || !strcmp(node->name, "array")) {
|
} else if (!strcmp(node->name, "stripe") || !strcmp(node->name, "array")) {
|
||||||
struct rnndelem *res = calloc(sizeof *res, 1);
|
struct rnndelem *res = calloc(sizeof *res, 1);
|
||||||
|
if (!strcmp(node->name, "array"))
|
||||||
|
res->name = "";
|
||||||
res->type = (strcmp(node->name, "stripe")?RNN_ETYPE_ARRAY:RNN_ETYPE_STRIPE);
|
res->type = (strcmp(node->name, "stripe")?RNN_ETYPE_ARRAY:RNN_ETYPE_STRIPE);
|
||||||
res->length = 1;
|
res->length = 1;
|
||||||
res->file = file;
|
res->file = file;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue