nir: serialize nir_parameter type

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
This commit is contained in:
Timothy Arceri 2024-08-15 12:10:10 +10:00 committed by Marge Bot
parent 6ff3e87e5f
commit 89a2411c54

View file

@ -1983,6 +1983,7 @@ write_function(write_ctx *ctx, const nir_function *fxn)
((uint32_t)fxn->params[i].num_components) |
((uint32_t)fxn->params[i].bit_size) << 8;
blob_write_uint32(ctx->blob, val);
encode_type_to_blob(ctx->blob, fxn->params[i].type);
}
/* At first glance, it looks like we should write the function_impl here.
@ -2016,6 +2017,7 @@ read_function(read_ctx *ctx)
uint32_t val = blob_read_uint32(ctx->blob);
fxn->params[i].num_components = val & 0xff;
fxn->params[i].bit_size = (val >> 8) & 0xff;
fxn->params[i].type = decode_type_from_blob(ctx->blob);
}
fxn->is_entrypoint = flags & 0x1;