Module: Mesa Branch: staging/21.3 Commit: b67ef02f9fd6375d9513daed670f650837c42c90 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b67ef02f9fd6375d9513daed670f650837c42c90
Author: Caio Oliveira <[email protected]> Date: Tue Nov 9 15:15:15 2021 -0800 util/ra: Fix deserialization of register sets Set ra_class::regset and ra_class::index when deserializing. Fixes: 95d41a3525d ("ra: Use struct ra_class in the public API.") Reviewed-by: Emma Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13728> (cherry picked from commit 6eb86efe9150caf59d991190e0c355841ab69766) --- .pick_status.json | 2 +- src/util/register_allocate.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 94b6c923c3d..b2f4a13c519 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -580,7 +580,7 @@ "description": "util/ra: Fix deserialization of register sets", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "95d41a3525d97986b4925153a36828b1a6e65523" }, diff --git a/src/util/register_allocate.c b/src/util/register_allocate.c index 83686feb62c..d9686d20534 100644 --- a/src/util/register_allocate.c +++ b/src/util/register_allocate.c @@ -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) *
