dan sinclair | 196326c | 2024-12-06 12:40:09 +0000 | [diff] [blame] | 1 | // |
| 2 | // fragment_main |
| 3 | // |
dan sinclair | 1e0c201 | 2024-09-04 01:56:01 +0000 | [diff] [blame] | 4 | #version 310 es |
| 5 | precision highp float; |
| 6 | precision highp int; |
dan sinclair | 6e93ca5 | 2024-08-28 23:58:04 +0000 | [diff] [blame] | 7 | |
dan sinclair | a532ca4 | 2024-09-16 19:11:42 +0000 | [diff] [blame] | 8 | layout(binding = 0, std430) |
James Price | 2312bfa | 2024-12-13 09:53:34 -0800 | [diff] [blame] | 9 | buffer f_prevent_dce_block_ssbo { |
James Price | 71c1d54 | 2024-10-10 23:01:19 +0000 | [diff] [blame] | 10 | uint inner; |
dan sinclair | a532ca4 | 2024-09-16 19:11:42 +0000 | [diff] [blame] | 11 | } v; |
dan sinclair | e0ca165 | 2024-09-24 20:37:31 +0000 | [diff] [blame] | 12 | uint tint_int_dot(uvec3 x, uvec3 y) { |
| 13 | return (((x.x * y.x) + (x.y * y.y)) + (x.z * y.z)); |
| 14 | } |
dan sinclair | 1e0c201 | 2024-09-04 01:56:01 +0000 | [diff] [blame] | 15 | uint dot_7548a0() { |
| 16 | uvec3 arg_0 = uvec3(1u); |
| 17 | uvec3 arg_1 = uvec3(1u); |
dan sinclair | e0ca165 | 2024-09-24 20:37:31 +0000 | [diff] [blame] | 18 | uint res = tint_int_dot(arg_0, arg_1); |
dan sinclair | 1e0c201 | 2024-09-04 01:56:01 +0000 | [diff] [blame] | 19 | return res; |
| 20 | } |
| 21 | void main() { |
James Price | 71c1d54 | 2024-10-10 23:01:19 +0000 | [diff] [blame] | 22 | v.inner = dot_7548a0(); |
dan sinclair | 1e0c201 | 2024-09-04 01:56:01 +0000 | [diff] [blame] | 23 | } |
dan sinclair | 196326c | 2024-12-06 12:40:09 +0000 | [diff] [blame] | 24 | // |
| 25 | // compute_main |
| 26 | // |
dan sinclair | 1e0c201 | 2024-09-04 01:56:01 +0000 | [diff] [blame] | 27 | #version 310 es |
dan sinclair | 1e0c201 | 2024-09-04 01:56:01 +0000 | [diff] [blame] | 28 | |
dan sinclair | a532ca4 | 2024-09-16 19:11:42 +0000 | [diff] [blame] | 29 | layout(binding = 0, std430) |
James Price | 71c1d54 | 2024-10-10 23:01:19 +0000 | [diff] [blame] | 30 | buffer prevent_dce_block_1_ssbo { |
| 31 | uint inner; |
dan sinclair | a532ca4 | 2024-09-16 19:11:42 +0000 | [diff] [blame] | 32 | } v; |
dan sinclair | e0ca165 | 2024-09-24 20:37:31 +0000 | [diff] [blame] | 33 | uint tint_int_dot(uvec3 x, uvec3 y) { |
| 34 | return (((x.x * y.x) + (x.y * y.y)) + (x.z * y.z)); |
| 35 | } |
dan sinclair | 1e0c201 | 2024-09-04 01:56:01 +0000 | [diff] [blame] | 36 | uint dot_7548a0() { |
| 37 | uvec3 arg_0 = uvec3(1u); |
| 38 | uvec3 arg_1 = uvec3(1u); |
dan sinclair | e0ca165 | 2024-09-24 20:37:31 +0000 | [diff] [blame] | 39 | uint res = tint_int_dot(arg_0, arg_1); |
dan sinclair | 1e0c201 | 2024-09-04 01:56:01 +0000 | [diff] [blame] | 40 | return res; |
| 41 | } |
dan sinclair | 1e0c201 | 2024-09-04 01:56:01 +0000 | [diff] [blame] | 42 | layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; |
| 43 | void main() { |
James Price | 71c1d54 | 2024-10-10 23:01:19 +0000 | [diff] [blame] | 44 | v.inner = dot_7548a0(); |
dan sinclair | 1e0c201 | 2024-09-04 01:56:01 +0000 | [diff] [blame] | 45 | } |
dan sinclair | 196326c | 2024-12-06 12:40:09 +0000 | [diff] [blame] | 46 | // |
| 47 | // vertex_main |
| 48 | // |
dan sinclair | 1e0c201 | 2024-09-04 01:56:01 +0000 | [diff] [blame] | 49 | #version 310 es |
dan sinclair | 1e0c201 | 2024-09-04 01:56:01 +0000 | [diff] [blame] | 50 | |
| 51 | |
| 52 | struct VertexOutput { |
| 53 | vec4 pos; |
| 54 | uint prevent_dce; |
| 55 | }; |
| 56 | |
James Price | ced6366 | 2024-12-13 10:48:26 -0800 | [diff] [blame] | 57 | layout(location = 0) flat out uint tint_interstage_location0; |
dan sinclair | e0ca165 | 2024-09-24 20:37:31 +0000 | [diff] [blame] | 58 | uint tint_int_dot(uvec3 x, uvec3 y) { |
| 59 | return (((x.x * y.x) + (x.y * y.y)) + (x.z * y.z)); |
| 60 | } |
dan sinclair | 1e0c201 | 2024-09-04 01:56:01 +0000 | [diff] [blame] | 61 | uint dot_7548a0() { |
| 62 | uvec3 arg_0 = uvec3(1u); |
| 63 | uvec3 arg_1 = uvec3(1u); |
dan sinclair | e0ca165 | 2024-09-24 20:37:31 +0000 | [diff] [blame] | 64 | uint res = tint_int_dot(arg_0, arg_1); |
dan sinclair | 1e0c201 | 2024-09-04 01:56:01 +0000 | [diff] [blame] | 65 | return res; |
| 66 | } |
dan sinclair | a532ca4 | 2024-09-16 19:11:42 +0000 | [diff] [blame] | 67 | VertexOutput vertex_main_inner() { |
James Price | 49631b5 | 2024-12-13 13:34:39 -0800 | [diff] [blame^] | 68 | VertexOutput v = VertexOutput(vec4(0.0f), 0u); |
| 69 | v.pos = vec4(0.0f); |
| 70 | v.prevent_dce = dot_7548a0(); |
| 71 | return v; |
dan sinclair | 1e0c201 | 2024-09-04 01:56:01 +0000 | [diff] [blame] | 72 | } |
dan sinclair | a532ca4 | 2024-09-16 19:11:42 +0000 | [diff] [blame] | 73 | void main() { |
James Price | 49631b5 | 2024-12-13 13:34:39 -0800 | [diff] [blame^] | 74 | VertexOutput v_1 = vertex_main_inner(); |
| 75 | gl_Position = v_1.pos; |
James Price | 25379d3 | 2024-11-28 21:23:47 +0000 | [diff] [blame] | 76 | gl_Position.y = -(gl_Position.y); |
| 77 | gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); |
James Price | 49631b5 | 2024-12-13 13:34:39 -0800 | [diff] [blame^] | 78 | tint_interstage_location0 = v_1.prevent_dce; |
dan sinclair | a532ca4 | 2024-09-16 19:11:42 +0000 | [diff] [blame] | 79 | gl_PointSize = 1.0f; |
| 80 | } |