nir/serialize: strip function names names

this makes stripped nir smaller.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33273>
This commit is contained in:
Alyssa Rosenzweig
2025-01-17 10:56:55 -05:00
committed by Marge Bot
parent 4425d8556f
commit d58ece8d83
+2 -2
View File
@@ -1959,7 +1959,7 @@ write_function(write_ctx *ctx, const nir_function *fxn)
flags |= 0x1;
if (fxn->is_preamble)
flags |= 0x2;
if (fxn->name)
if (fxn->name && !ctx->strip)
flags |= 0x4;
if (fxn->impl)
flags |= 0x8;
@@ -1974,7 +1974,7 @@ write_function(write_ctx *ctx, const nir_function *fxn)
if (fxn->workgroup_size[0] || fxn->workgroup_size[1] || fxn->workgroup_size[2])
flags |= 0x100;
blob_write_uint32(ctx->blob, flags);
if (fxn->name)
if (fxn->name && !ctx->strip)
blob_write_string(ctx->blob, fxn->name);
if (flags & 0x100) {