Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/dxil.c:
+ } + + return value_count; +} + +static bool sm6_parser_declare_function(struct sm6_parser *sm6, const struct dxil_record *record) +{ + const struct sm6_type *ret_type; + struct sm6_value *fn; + unsigned int i, j; + + if (record->operand_count < 5) + { + WARN("Missing operands for function %u.\n", sm6->value_count); + return false; + } Which reference are you using? Unless I'm mistaken, DXIL is based on LLVM 3.7, and both [in the code](https://github.com/jtcriswell/safecode-llvm37/blob/master/lib/Bitcode/Reader...) and [in the documentation](https://releases.llvm.org/3.7.0/docs/BitCodeFormat.html#module-code-function...) it seems that you need at least 8 operands. The same seems to happen [in Microsoft's own code](https://github.com/microsoft/DirectXShaderCompiler/blob/main/lib/Bitcode/Rea...).
-- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/259#note_37552