I imagine this is to make vkd3d_shader_scan() more similar to vkd3d_shader_compile(), but I think vkd3d_unreachable() is worse than the existing code.
Even if the source type is already validated by `vkd3d_shader_validate_compile_info()`? Which use do you see into validating the source type twice?
I feel a bit ambivalent about this MR. It's nice to get rid of some duplication and room for potential inconsistencies between vkd3d_shader_scan() and vkd3d_shader_compile(), but I don't love scan_or_compile(), and its "compile" argument in particular.
I can see how that commit can be a bit more controversial than the others. Let's drop it for the moment.