Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/hlsl_sm1.c:
D3DSHADER_PARAM_SRCMOD_TYPE mod; unsigned int swizzle; uint32_t reg;
- } srcs[2];
- } srcs[HLSL_MAX_OPERANDS];
I wouldn't use HLSL_MAX_OPERANDS here; the maximum number of HLSL expression operands isn't semantically equal to the maximum number of sm1 instruction sources. E.g. sm4 uses 4 here, for things like resource load instructions (I think the actual maximum source count for known instructions is 6).