mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-09-13 09:16:14 -07:00
vkd3d-shader: Use the program parameters in spirv_compiler_alloc_spec_constant_id().
This commit is contained in:
parent
a0de05f0b4
commit
d20d0fc69f
Notes:
Henri Verbeet
2024-07-24 16:16:36 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/959
@ -3316,12 +3316,11 @@ static uint32_t spirv_compiler_alloc_spec_constant_id(struct spirv_compiler *com
|
||||
{
|
||||
if (!compiler->current_spec_constant_id)
|
||||
{
|
||||
const struct vkd3d_shader_spirv_target_info *info = compiler->spirv_target_info;
|
||||
unsigned int i, id = 0;
|
||||
|
||||
for (i = 0; info && i < info->parameter_count; ++i)
|
||||
for (i = 0; i < compiler->program->parameter_count; ++i)
|
||||
{
|
||||
const struct vkd3d_shader_parameter *current = &info->parameters[i];
|
||||
const struct vkd3d_shader_parameter1 *current = &compiler->program->parameters[i];
|
||||
|
||||
if (current->type == VKD3D_SHADER_PARAMETER_TYPE_SPECIALIZATION_CONSTANT)
|
||||
id = max(current->u.specialization_constant.id + 1, id);
|
||||
|
Loading…
Reference in New Issue
Block a user