Francisco Casas (@fcasas) commented about libs/vkd3d-shader/hlsl.y:
+ hlsl_get_scalar_type(ctx, HLSL_TYPE_UINT), loc))) + { + return false; + } + + continue; + } + + uint_resinfo &= hlsl_types_are_equal(params->args[j]->data_type, uint_type); + + if (!hlsl_types_are_equal(params->args[j]->data_type, uint_type) && + !hlsl_types_are_equal(params->args[j]->data_type, float_type)) + { + hlsl_error(ctx, loc, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE, "Expected float or uint argument."); + break; + } `int` arguments (and I suspect, any scalar) are also allowed, such as in this shader:
```hlsl Texture1D t; float4 main() : sv_target { float p; int q; t.GetDimensions(1.2, p, q); return p + q; } ``` Perhaps we should just work with floats, just validate that the argument is scalar, and add an implicit conversion in add_assignment_from_component(), to `dest->data_type`. If we do this, we wouldn't be using the `_uint` instruction modifier though. -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/218#note_34316