vkd3d-shader/hlsl: Cast index to uint in new_offset_from_path_index().

Scalar input semantics of type uint are currently cast into the vector type uint1, which causes new_offset_from_path_index() to fail.

Without this patch, the following ps_4_0 pixel shader

float4 main(uint idx : texcoord0) : sv_target
{
    float a[4] = {1, 2, 3, 4};
    return a[idx];
}

aborts during compilation, with the assertion error

err:hlsl_new_binary_expr Failed assertion: hlsl_types_are_equal(arg1->data_type, arg2->data_type)
Edited by Shaun Ren

Merge request reports

Loading