Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl.y:
+ unsigned int idx = 0; + + if (!(var = hlsl_new_synthetic_var(ctx, "coords", hlsl_get_vector_type(ctx, HLSL_TYPE_FLOAT, 2), loc))) + return false; + + initialize_var_components(ctx, params->instrs, var, &idx, coords); + if (shader_profile_version_ge(ctx, 4, 0)) + { + if (!(half = hlsl_new_float_constant(ctx, 0.5f, loc))) + return false; + hlsl_block_add_instr(params->instrs, half); + + initialize_var_components(ctx, params->instrs, var, &idx, half); + } + else + initialize_var_components(ctx, params->instrs, var, &idx, coords); Nitpick: this should be enclosed in braces (because the other branch is).
-- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/339#note_45187