util/ra: Fix deserialization of register sets

Set ra_class::regset and ra_class::index  when deserializing.

Fixes: 95d41a3525 ("ra: Use struct ra_class in the public API.")
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13728>
(cherry picked from commit 6eb86efe91)
This commit is contained in:
Caio Oliveira 2021-11-09 15:15:15 -08:00 committed by Eric Engestrom
parent c0d6fbba8e
commit 764e965f37
2 changed files with 3 additions and 1 deletions

View file

@ -1804,7 +1804,7 @@
"description": "util/ra: Fix deserialization of register sets",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "95d41a3525d97986b4925153a36828b1a6e65523"
},

View file

@ -454,6 +454,8 @@ ra_set_deserialize(void *mem_ctx, struct blob_reader *blob)
for (unsigned int c = 0; c < class_count; c++) {
struct ra_class *class = rzalloc(regs, struct ra_class);
regs->classes[c] = class;
class->regset = regs;
class->index = c;
class->regs = ralloc_array(class, BITSET_WORD, BITSET_WORDS(reg_count));
blob_copy_bytes(blob, class->regs, BITSET_WORDS(reg_count) *