Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/dxil.c:
break;
}
j = values[3];
e->sysval_semantic = sysval_semantic_from_dxil_semantic_kind(j);
if (j != SEMANTIC_KIND_ARBITRARY && j != SEMANTIC_KIND_TARGET && e->sysval_semantic == VKD3D_SHADER_SV_NONE)
{
WARN("Unhandled semantic kind %u.\n", j);
vkd3d_shader_parser_error(&sm6->p, VKD3D_SHADER_ERROR_DXIL_INVALID_SIGNATURE,
"DXIL semantic kind %u is unhandled.", j);
return VKD3D_ERROR_INVALID_SHADER;
}
/* bool I/O for non-sysvals is invalid in SPIR-V, and DXIL reads/writes uint anyway. */
if (e->component_type == VKD3D_SHADER_COMPONENT_BOOL && !e->sysval_semantic)
e->component_type = VKD3D_SHADER_COMPONENT_UINT;
What SPIR-V mandates is not really relevant here, because eventually the VSIR generated from this could be fed to some other backend, like MSL. Does it make sense to map bool to uint at the VSIR level, or should be it just be done in the SPIR-V backend?