Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl.y:
- } + switch (constant->node.data_type->base_type) + { + case HLSL_TYPE_DOUBLE: + ret = value.d; + break; + case HLSL_TYPE_FLOAT: + case HLSL_TYPE_HALF: + ret = value.f; + break; + case HLSL_TYPE_INT: + ret = value.i; + break; + case HLSL_TYPE_UINT: + case HLSL_TYPE_BOOL: + ret = value.u; That's wrong, `true` is represented as `0xffffffff`, but must be converted to `1`. Rather than doing "by hand" the final cast, I'd rather use `add_implicit_conversion()` to `uint` and then unconditionally read `value.u`. This resuses the code that we have already, displays errors and warnings as appropriate and maybe even make this function shorter.
-- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/180#note_31516