Ben Clayton | c0af5c5 | 2022-06-02 14:36:10 +0000 | [diff] [blame] | 1 | #version 310 es |
Ben Clayton | f1f56b2 | 2023-03-09 19:58:23 +0000 | [diff] [blame] | 2 | precision highp float; |
Stephen White | ca9f386 | 2024-02-07 18:08:23 +0000 | [diff] [blame] | 3 | precision highp int; |
Ben Clayton | c0af5c5 | 2022-06-02 14:36:10 +0000 | [diff] [blame] | 4 | |
Natalie Chouinard | 6ee6330 | 2024-06-25 20:45:30 +0000 | [diff] [blame] | 5 | layout(binding = 0, std430) buffer prevent_dce_block_ssbo { |
| 6 | ivec2 inner; |
| 7 | } prevent_dce; |
| 8 | |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 9 | ivec2 min_03c7e3() { |
| 10 | ivec2 arg_0 = ivec2(1); |
| 11 | ivec2 arg_1 = ivec2(1); |
| 12 | ivec2 res = min(arg_0, arg_1); |
| 13 | return res; |
| 14 | } |
| 15 | |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 16 | struct VertexOutput { |
| 17 | vec4 pos; |
| 18 | ivec2 prevent_dce; |
| 19 | }; |
Ben Clayton | c0af5c5 | 2022-06-02 14:36:10 +0000 | [diff] [blame] | 20 | |
| 21 | void fragment_main() { |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 22 | prevent_dce.inner = min_03c7e3(); |
Ben Clayton | c0af5c5 | 2022-06-02 14:36:10 +0000 | [diff] [blame] | 23 | } |
| 24 | |
| 25 | void main() { |
| 26 | fragment_main(); |
| 27 | return; |
| 28 | } |
| 29 | #version 310 es |
| 30 | |
Natalie Chouinard | 6ee6330 | 2024-06-25 20:45:30 +0000 | [diff] [blame] | 31 | layout(binding = 0, std430) buffer prevent_dce_block_ssbo { |
| 32 | ivec2 inner; |
| 33 | } prevent_dce; |
| 34 | |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 35 | ivec2 min_03c7e3() { |
| 36 | ivec2 arg_0 = ivec2(1); |
| 37 | ivec2 arg_1 = ivec2(1); |
| 38 | ivec2 res = min(arg_0, arg_1); |
| 39 | return res; |
| 40 | } |
| 41 | |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 42 | struct VertexOutput { |
| 43 | vec4 pos; |
| 44 | ivec2 prevent_dce; |
| 45 | }; |
Ben Clayton | c0af5c5 | 2022-06-02 14:36:10 +0000 | [diff] [blame] | 46 | |
| 47 | void compute_main() { |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 48 | prevent_dce.inner = min_03c7e3(); |
Ben Clayton | c0af5c5 | 2022-06-02 14:36:10 +0000 | [diff] [blame] | 49 | } |
| 50 | |
| 51 | layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; |
| 52 | void main() { |
| 53 | compute_main(); |
| 54 | return; |
| 55 | } |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 56 | #version 310 es |
| 57 | |
| 58 | layout(location = 0) flat out ivec2 prevent_dce_1; |
| 59 | ivec2 min_03c7e3() { |
| 60 | ivec2 arg_0 = ivec2(1); |
| 61 | ivec2 arg_1 = ivec2(1); |
| 62 | ivec2 res = min(arg_0, arg_1); |
| 63 | return res; |
| 64 | } |
| 65 | |
| 66 | struct VertexOutput { |
| 67 | vec4 pos; |
| 68 | ivec2 prevent_dce; |
| 69 | }; |
| 70 | |
| 71 | VertexOutput vertex_main() { |
| 72 | VertexOutput tint_symbol = VertexOutput(vec4(0.0f, 0.0f, 0.0f, 0.0f), ivec2(0, 0)); |
| 73 | tint_symbol.pos = vec4(0.0f); |
| 74 | tint_symbol.prevent_dce = min_03c7e3(); |
| 75 | return tint_symbol; |
| 76 | } |
| 77 | |
| 78 | void main() { |
| 79 | gl_PointSize = 1.0; |
| 80 | VertexOutput inner_result = vertex_main(); |
| 81 | gl_Position = inner_result.pos; |
| 82 | prevent_dce_1 = inner_result.prevent_dce; |
| 83 | gl_Position.y = -(gl_Position.y); |
| 84 | gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); |
| 85 | return; |
| 86 | } |