Certainly for `sm6_parser_metadata_init()`, but testing each patch would be a problem unless the default case `continue`s, and then we check `failed` on return. Otherwise it may error out on a test shader before the new code is run. I'm not sure if it's worth messing with, but Henri may like to comment.
I don't think that's a big problem. All this code is still in an early stage, I think it's fine if it breaks after two records because something is not implemented. The point here is making it easy to understand the code logic incrementally rather than decode a lot of metadata records.
Yes, what Giovanni said.
I haven't reviewed this in much detail yet, but I notice the first two patches essentially add dead code, and the third patch adds code that would violate some of the assertions introduced in the first two patches.