mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
GLSL allows the last case of a switch statement to not have a `break` statement causing it to be marked as fall-trough, naga's IR on the other hand doesn't allow the last case to be fall-trough, this is fixed by force marking it in the glsl frontend as not fall-trough. GLSL also allows empty switch statements and without default cases, naga's IR requires there be a default case, this is fixed by adding an empty default case in the glsl frontend if no default case was present in the switch statement.