dan sinclair | 196326c | 2024-12-06 12:40:09 +0000 | [diff] [blame] | 1 | // |
| 2 | // fragment_main |
| 3 | // |
dan sinclair | 8124737 | 2024-09-18 00:01:43 +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 | ec3114d | 2024-11-28 16:23:49 +0000 | [diff] [blame] | 8 | |
| 9 | struct TintTextureUniformData { |
| 10 | uint tint_builtin_value_0; |
| 11 | }; |
| 12 | |
dan sinclair | 8124737 | 2024-09-18 00:01:43 +0000 | [diff] [blame] | 13 | layout(binding = 0, std430) |
James Price | 2312bfa | 2024-12-13 09:53:34 -0800 | [diff] [blame] | 14 | buffer f_prevent_dce_block_ssbo { |
James Price | 71c1d54 | 2024-10-10 23:01:19 +0000 | [diff] [blame] | 15 | uvec2 inner; |
dan sinclair | 8124737 | 2024-09-18 00:01:43 +0000 | [diff] [blame] | 16 | } v; |
dan sinclair | ec3114d | 2024-11-28 16:23:49 +0000 | [diff] [blame] | 17 | layout(binding = 0, std140) |
James Price | 2312bfa | 2024-12-13 09:53:34 -0800 | [diff] [blame] | 18 | uniform f_tint_symbol_ubo { |
dan sinclair | ec3114d | 2024-11-28 16:23:49 +0000 | [diff] [blame] | 19 | TintTextureUniformData inner; |
| 20 | } v_1; |
dan sinclair | d048638 | 2024-10-08 16:18:40 +0000 | [diff] [blame] | 21 | uniform highp sampler2D arg_0; |
dan sinclair | 8124737 | 2024-09-18 00:01:43 +0000 | [diff] [blame] | 22 | uvec2 textureDimensions_6f1b5d() { |
| 23 | int arg_1 = 1; |
dan sinclair | ec3114d | 2024-11-28 16:23:49 +0000 | [diff] [blame] | 24 | uint v_2 = (v_1.inner.tint_builtin_value_0 - 1u); |
| 25 | uvec2 res = uvec2(textureSize(arg_0, int(min(uint(arg_1), v_2)))); |
dan sinclair | 8124737 | 2024-09-18 00:01:43 +0000 | [diff] [blame] | 26 | return res; |
| 27 | } |
| 28 | void main() { |
James Price | 71c1d54 | 2024-10-10 23:01:19 +0000 | [diff] [blame] | 29 | v.inner = textureDimensions_6f1b5d(); |
dan sinclair | 8124737 | 2024-09-18 00:01:43 +0000 | [diff] [blame] | 30 | } |
dan sinclair | 196326c | 2024-12-06 12:40:09 +0000 | [diff] [blame] | 31 | // |
| 32 | // compute_main |
| 33 | // |
dan sinclair | 8124737 | 2024-09-18 00:01:43 +0000 | [diff] [blame] | 34 | #version 310 es |
dan sinclair | 6e93ca5 | 2024-08-28 23:58:04 +0000 | [diff] [blame] | 35 | |
dan sinclair | ec3114d | 2024-11-28 16:23:49 +0000 | [diff] [blame] | 36 | |
| 37 | struct TintTextureUniformData { |
| 38 | uint tint_builtin_value_0; |
| 39 | }; |
| 40 | |
dan sinclair | 8124737 | 2024-09-18 00:01:43 +0000 | [diff] [blame] | 41 | layout(binding = 0, std430) |
James Price | 71c1d54 | 2024-10-10 23:01:19 +0000 | [diff] [blame] | 42 | buffer prevent_dce_block_1_ssbo { |
| 43 | uvec2 inner; |
dan sinclair | 8124737 | 2024-09-18 00:01:43 +0000 | [diff] [blame] | 44 | } v; |
dan sinclair | ec3114d | 2024-11-28 16:23:49 +0000 | [diff] [blame] | 45 | layout(binding = 0, std140) |
dan sinclair | 196326c | 2024-12-06 12:40:09 +0000 | [diff] [blame] | 46 | uniform tint_symbol_1_ubo { |
dan sinclair | ec3114d | 2024-11-28 16:23:49 +0000 | [diff] [blame] | 47 | TintTextureUniformData inner; |
| 48 | } v_1; |
dan sinclair | d048638 | 2024-10-08 16:18:40 +0000 | [diff] [blame] | 49 | uniform highp sampler2D arg_0; |
dan sinclair | 8124737 | 2024-09-18 00:01:43 +0000 | [diff] [blame] | 50 | uvec2 textureDimensions_6f1b5d() { |
| 51 | int arg_1 = 1; |
dan sinclair | ec3114d | 2024-11-28 16:23:49 +0000 | [diff] [blame] | 52 | uint v_2 = (v_1.inner.tint_builtin_value_0 - 1u); |
| 53 | uvec2 res = uvec2(textureSize(arg_0, int(min(uint(arg_1), v_2)))); |
dan sinclair | 8124737 | 2024-09-18 00:01:43 +0000 | [diff] [blame] | 54 | return res; |
| 55 | } |
| 56 | layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; |
| 57 | void main() { |
James Price | 71c1d54 | 2024-10-10 23:01:19 +0000 | [diff] [blame] | 58 | v.inner = textureDimensions_6f1b5d(); |
dan sinclair | 8124737 | 2024-09-18 00:01:43 +0000 | [diff] [blame] | 59 | } |
dan sinclair | 196326c | 2024-12-06 12:40:09 +0000 | [diff] [blame] | 60 | // |
| 61 | // vertex_main |
| 62 | // |
dan sinclair | 8124737 | 2024-09-18 00:01:43 +0000 | [diff] [blame] | 63 | #version 310 es |
| 64 | |
| 65 | |
dan sinclair | ec3114d | 2024-11-28 16:23:49 +0000 | [diff] [blame] | 66 | struct TintTextureUniformData { |
| 67 | uint tint_builtin_value_0; |
| 68 | }; |
| 69 | |
dan sinclair | 8124737 | 2024-09-18 00:01:43 +0000 | [diff] [blame] | 70 | struct VertexOutput { |
| 71 | vec4 pos; |
| 72 | uvec2 prevent_dce; |
| 73 | }; |
| 74 | |
dan sinclair | ec3114d | 2024-11-28 16:23:49 +0000 | [diff] [blame] | 75 | layout(binding = 0, std140) |
James Price | 49631b5 | 2024-12-13 13:34:39 -0800 | [diff] [blame^] | 76 | uniform v_tint_symbol_ubo { |
dan sinclair | ec3114d | 2024-11-28 16:23:49 +0000 | [diff] [blame] | 77 | TintTextureUniformData inner; |
| 78 | } v; |
dan sinclair | d048638 | 2024-10-08 16:18:40 +0000 | [diff] [blame] | 79 | uniform highp sampler2D arg_0; |
James Price | ced6366 | 2024-12-13 10:48:26 -0800 | [diff] [blame] | 80 | layout(location = 0) flat out uvec2 tint_interstage_location0; |
dan sinclair | 8124737 | 2024-09-18 00:01:43 +0000 | [diff] [blame] | 81 | uvec2 textureDimensions_6f1b5d() { |
| 82 | int arg_1 = 1; |
dan sinclair | ec3114d | 2024-11-28 16:23:49 +0000 | [diff] [blame] | 83 | uint v_1 = (v.inner.tint_builtin_value_0 - 1u); |
| 84 | uvec2 res = uvec2(textureSize(arg_0, int(min(uint(arg_1), v_1)))); |
dan sinclair | 8124737 | 2024-09-18 00:01:43 +0000 | [diff] [blame] | 85 | return res; |
| 86 | } |
| 87 | VertexOutput vertex_main_inner() { |
James Price | 49631b5 | 2024-12-13 13:34:39 -0800 | [diff] [blame^] | 88 | VertexOutput v_2 = VertexOutput(vec4(0.0f), uvec2(0u)); |
| 89 | v_2.pos = vec4(0.0f); |
| 90 | v_2.prevent_dce = textureDimensions_6f1b5d(); |
| 91 | return v_2; |
dan sinclair | 8124737 | 2024-09-18 00:01:43 +0000 | [diff] [blame] | 92 | } |
| 93 | void main() { |
James Price | 49631b5 | 2024-12-13 13:34:39 -0800 | [diff] [blame^] | 94 | VertexOutput v_3 = vertex_main_inner(); |
| 95 | gl_Position = v_3.pos; |
James Price | 25379d3 | 2024-11-28 21:23:47 +0000 | [diff] [blame] | 96 | gl_Position.y = -(gl_Position.y); |
| 97 | gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); |
James Price | 49631b5 | 2024-12-13 13:34:39 -0800 | [diff] [blame^] | 98 | tint_interstage_location0 = v_3.prevent_dce; |
dan sinclair | 8124737 | 2024-09-18 00:01:43 +0000 | [diff] [blame] | 99 | gl_PointSize = 1.0f; |
| 100 | } |