mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-make/hlsl: Trace the number of registers allocated in allocate_temp_registers().
This commit is contained in:
committed by
Henri Verbeet
parent
f830ac1206
commit
1d74ff075e
Notes:
Henri Verbeet
2025-02-20 16:06:52 +01:00
Approved-by: Henri Verbeet (@hverbeet) Approved-by: Elizabeth Figura (@zfigura) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1367
@@ -5001,7 +5001,7 @@ struct register_allocator
|
||||
|
||||
/* Indexable temps are allocated separately and always keep their index regardless of their
|
||||
* lifetime. */
|
||||
size_t indexable_count;
|
||||
uint32_t indexable_count;
|
||||
|
||||
/* Total number of registers allocated so far. Used to declare sm4 temp count. */
|
||||
uint32_t reg_count;
|
||||
@@ -5782,6 +5782,13 @@ static uint32_t allocate_temp_registers(struct hlsl_ctx *ctx, struct hlsl_ir_fun
|
||||
allocate_temp_registers_recurse(ctx, &entry_func->body, &allocator);
|
||||
vkd3d_free(allocator.allocations);
|
||||
|
||||
if (allocator.indexable_count)
|
||||
TRACE("Declaration of function \"%s\" required %u temp registers, and %u indexable temps.\n",
|
||||
entry_func->func->name, allocator.reg_count, allocator.indexable_count);
|
||||
else
|
||||
TRACE("Declaration of function \"%s\" required %u temp registers.\n",
|
||||
entry_func->func->name, allocator.reg_count);
|
||||
|
||||
return allocator.reg_count;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user