Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl.y:
} vkd3d_free(v->arrays.sizes);
- if (modifiers & (HLSL_STORAGE_IN | HLSL_STORAGE_OUT)) - { - struct vkd3d_string_buffer *string; - - if ((string = hlsl_modifiers_to_string(ctx, modifiers & (HLSL_STORAGE_IN | HLSL_STORAGE_OUT)))) - hlsl_error(ctx, &v->loc, VKD3D_SHADER_ERROR_HLSL_INVALID_MODIFIER, - "Modifiers '%s' are not allowed on non-parameter variables.", string->buffer); - hlsl_release_string_buffer(ctx, string); - } -
Can't you just move this check before the loop in `declare_vars()`, instead of duplicating it before each call to `declare_vars()`? -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/98#note_24541