7 Jul
2023
7 Jul
'23
12:06 p.m.
Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/dxil.c:
+ enum vkd3d_shader_register_type reg_type = VKD3DSPR_INVALID; + const struct sm6_type *type, *elem_type; + enum vkd3d_data_type reg_data_type; + const struct dxil_record *record; + unsigned int i, value_idx; + struct sm6_value *dst; + uint64_t value; + + for (i = 0, type = NULL; i < block->record_count; ++i) + { + record = block->records[i]; + value_idx = sm6->value_count; + + if (record->code == CST_CODE_SETTYPE) + { + if (!record->operand_count) Here we could validate the max operand count too. Also in the `switch` cases.
-- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/259#note_38313