third_party/spirv-cross/reference/shaders/frag/flush_params.frag
raw| 1 | #version 310 es |
| 2 | precision mediump float; |
| 3 | precision highp int; |
| 4 | |
| 5 | struct Structy |
| 6 | { |
| 7 | vec4 c; |
| 8 | }; |
| 9 | |
| 10 | layout(location = 0) out vec4 FragColor; |
| 11 | |
| 12 | void foo2(inout Structy f) |
| 13 | { |
| 14 | f.c = vec4(10.0); |
| 15 | } |
| 16 | |
| 17 | Structy foo() |
| 18 | { |
| 19 | Structy param; |
| 20 | foo2(param); |
| 21 | Structy f = param; |
| 22 | return f; |
| 23 | } |
| 24 | |
| 25 | void main() |
| 26 | { |
| 27 | Structy s = foo(); |
| 28 | FragColor = s.c; |
| 29 | } |
| 30 |