Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/dxil.c:
if (!vkd3d_array_reserve((void **)&desc->descriptors, descriptor_capacity,
desc->descriptor_count + 1, sizeof(*desc->descriptors)))
{
ERR("Failed to allocate descriptor array.\n");
vkd3d_shader_parser_error(&sm6->p, VKD3D_SHADER_ERROR_DXIL_OUT_OF_MEMORY,
"Out of memory allocating the descriptor array.");
return VKD3D_ERROR_OUT_OF_MEMORY;
}
d = &desc->descriptors[desc->descriptor_count];
memset(d, 0, sizeof(*d));
d->type = type;
node = m->u.node;
if (!sm6_metadata_get_uint_value(sm6, node->operands[0], &d->register_id))
I don't think you're checking the number of operands available in this node, are you? You do the check in `sm6_parser_resources_load_cbv()`, but that's only for CBV and it's too late anyway.