The latest SPIR-V spec currently says of the Location decoration:
Only valid for the Input, Output, and UniformConstant Storage Classes.
However, the NV_ray_tracing extension also uses it for ray payloads and callable data which have their own storage classes. This bug is being fixed by https://github.com/KhronosGroup/SPIRV-Registry/pull/80. However, to my knowledge, SPV_NV_ray_tracing shaders aren't failing validation so there is a validation check missing here.
Right now the validator checks vertex, tessellation, geometry and fragment stages for correct location and component assignment. I'd be happy to review additions covering ray tracing.
The latest SPIR-V spec currently says of the Location decoration:
However, the NV_ray_tracing extension also uses it for ray payloads and callable data which have their own storage classes. This bug is being fixed by https://github.com/KhronosGroup/SPIRV-Registry/pull/80. However, to my knowledge, SPV_NV_ray_tracing shaders aren't failing validation so there is a validation check missing here.