nir: Serialize all parameter attributes

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33246>
This commit is contained in:
Friedrich Vock 2024-06-17 12:55:48 +02:00 committed by Marge Bot
parent 54879582b4
commit 3321a56d1d

View file

@ -2001,6 +2001,8 @@ write_function(write_ctx *ctx, const nir_function *fxn)
if (has_name) if (has_name)
val |= 0x10000; val |= 0x10000;
if (fxn->params[i].is_return)
val |= (1u << 17);
blob_write_uint32(ctx->blob, val); blob_write_uint32(ctx->blob, val);
if (has_name) if (has_name)
blob_write_string(ctx->blob, fxn->params[i].name); blob_write_string(ctx->blob, fxn->params[i].name);
@ -2050,6 +2052,7 @@ read_function(read_ctx *ctx)
fxn->params[i].num_components = val & 0xff; fxn->params[i].num_components = val & 0xff;
fxn->params[i].bit_size = (val >> 8) & 0xff; fxn->params[i].bit_size = (val >> 8) & 0xff;
fxn->params[i].is_return = val & (1u << 16);
fxn->params[i].type = decode_type_from_blob(ctx->blob); fxn->params[i].type = decode_type_from_blob(ctx->blob);
fxn->params[i].mode = decode_deref_modes(blob_read_uint32(ctx->blob)); fxn->params[i].mode = decode_deref_modes(blob_read_uint32(ctx->blob));
} }