mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader: Raise the instruction parameter allocation size if necessary.
Monolithic switch instructions have no definite case count limit.
This commit is contained in:
parent
55c28e94f8
commit
6e634ad690
Notes:
Alexandre Julliard
2024-02-14 23:27:28 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/649
@ -2048,9 +2048,12 @@ void *shader_param_allocator_get(struct vkd3d_shader_param_allocator *allocator,
|
||||
|
||||
if (count > allocator->count - allocator->index)
|
||||
{
|
||||
struct vkd3d_shader_param_node *next = shader_param_allocator_node_create(allocator);
|
||||
struct vkd3d_shader_param_node *next;
|
||||
|
||||
if (!next)
|
||||
/* Monolithic switch has no definite parameter count limit. */
|
||||
allocator->count = max(allocator->count, count);
|
||||
|
||||
if (!(next = shader_param_allocator_node_create(allocator)))
|
||||
return NULL;
|
||||
if (allocator->current)
|
||||
allocator->current->next = next;
|
||||
|
Loading…
x
Reference in New Issue
Block a user