mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-07 01:42:04 +00:00
[qfcc] Clear the function queue immediately
The function queue needs to be cleared before figuring out the interface symbols otherwise the variables referenced only by called functions will not get into the list of interface symbols.
This commit is contained in:
parent
75f59b01c2
commit
2f941ff9dd
1 changed files with 5 additions and 4 deletions
|
@ -838,6 +838,11 @@ spirv_EntryPoint (entrypoint_t *entrypoint, spirvctx_t *ctx)
|
|||
}
|
||||
|
||||
unsigned func_id = spirv_function (entrypoint->func, ctx);
|
||||
while (ctx->func_queue.size) {
|
||||
auto func = DARRAY_REMOVE (&ctx->func_queue);
|
||||
spirv_function (func, ctx);
|
||||
}
|
||||
|
||||
int len = strlen (entrypoint->name) + 1;
|
||||
int iface_start = 3 + RUP(len, 4) / 4;
|
||||
auto linkage = ctx->module->entry_point_space;
|
||||
|
@ -2047,10 +2052,6 @@ spirv_write (struct pr_info_s *pr, const char *filename)
|
|||
|
||||
for (auto ep = pr->module->entry_points; ep; ep = ep->next) {
|
||||
spirv_EntryPoint (ep, &ctx);
|
||||
while (ctx.func_queue.size) {
|
||||
auto func = DARRAY_REMOVE (&ctx.func_queue);
|
||||
spirv_function (func, &ctx);
|
||||
}
|
||||
}
|
||||
|
||||
auto mod = pr->module;
|
||||
|
|
Loading…
Reference in a new issue