Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/dxil.c:
++block_idx; code_block = (block_idx < function->block_count) ? function->blocks[block_idx] : NULL; }
if (ins->handler_idx == VKD3DSIH_INVALID)
{
/* Parsing can continue if we have a result, otherwise the value references will be corrupted. */
if (result_type == RESULT_VALUE && !dst->type)
return VKD3D_ERROR_INVALID_SHADER;
Why not always returning the error? What is the advantage of doing some more parsing, if the only information we're going to return is just a generic failure error, without additional diagnostics?