Quick answer: SPIR-V Cross output 3x larger than expected? Debug info preserved by default - strip with --strip-debug or pre-strip the SPIR-V before translation.
Shipping shader cache is 40MB. Expected ~12MB. SPIR-V Cross is keeping debug names through the GLSL/HLSL output.
Strip before translate
spirv-opt --strip-debug shader.spv -o stripped.spv
spirv-cross stripped.spvStrip first, then translate. The output is much leaner.
Or use --strip-debug
Pass directly to spirv-cross when supported by your build flow.
Audit binary sizes
Per-shader size dump in CI. Sudden growth indicates upstream change in compiler flags; track down before it hits players.
“Shaders carry a lot of metadata. Stripping it doesn't change behavior.”
Add binary size to your shader CI gate. Most regressions are accidental; an alert catches them immediately.