vkd3d-shader: Set the program block count to the maximum for any function.

The block count is intended to be used for allocation of block info.
This commit is contained in:
Conor McCarthy
2024-05-24 15:30:44 +10:00
committed by Henri Verbeet
parent a5a8a4cc99
commit 2d508a2fa6
Notes: Henri Verbeet 2025-10-03 00:55:37 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1763
4 changed files with 8 additions and 5 deletions

View File

@@ -8653,7 +8653,7 @@ static enum vkd3d_result sm6_function_emit_blocks(const struct sm6_function *fun
struct vkd3d_shader_instruction *ins;
unsigned int i, j;
program->block_count = function->block_count;
program->block_count = max(program->block_count, function->block_count);
for (i = 0; i < function->block_count; ++i)
{