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>
This commit is contained in:
Caio Oliveira 2021-11-09 15:15:15 -08:00 committed by Marge Bot
parent ac416ce07b
commit 6eb86efe91
2 changed files with 3 additions and 1 deletions

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) *

View File

@ -212,7 +212,7 @@ TEST_F(ra_test, aligned_contigregs)
}
}
TEST_F(ra_test, DISABLED_serialization_roundtrip)
TEST_F(ra_test, serialization_roundtrip)
{
struct blob blob;
blob_init(&blob);