Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/dxil.c:
e->component_type = vkd3d_component_type_from_dxil_component_type(values[2]);
switch (values[2])
{
case COMPONENT_TYPE_F16:
e->min_precision = VKD3D_SHADER_MINIMUM_PRECISION_FLOAT_16;
break;
case COMPONENT_TYPE_I16:
e->min_precision = VKD3D_SHADER_MINIMUM_PRECISION_INT_16;
break;
case COMPONENT_TYPE_U16:
e->min_precision = VKD3D_SHADER_MINIMUM_PRECISION_UINT_16;
break;
default:
e->min_precision = VKD3D_SHADER_MINIMUM_PRECISION_NONE;
break;
}
It's mostly a matter of tastes, but I would consider moving the `min_precision` decoding either in `vkd3d_component_type_from_dxil_component_type()` or in a similar helper `vkd3d_min_precision_from_dxil_component_type()`, so the flow of the main function is more uniform and simpler to follow.