From: Chris Duncan Date: Tue, 14 Jan 2025 17:41:45 +0000 (-0800) Subject: Remove unneeded v_01 vector assignments. X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=6f0b6e55988380ba83b2ecf158d663cf58e26764;p=nano-pow.git Remove unneeded v_01 vector assignments. --- diff --git a/src/shaders/compute.wgsl b/src/shaders/compute.wgsl index 1bb9f97..dddb354 100644 --- a/src/shaders/compute.wgsl +++ b/src/shaders/compute.wgsl @@ -127,8 +127,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_01.x = v0; - v_01.y = v1; v_89.x = v8; v_89.y = v9; v_01 = v_01 + v_89 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_89.x < v_01.x); @@ -170,8 +168,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { v9 = (xor1 >> 24u) ^ (xor0 << 8u); // a = a + b - v_01.x = v0; - v_01.y = v1; v_89.x = v8; v_89.y = v9; v_01 = v_01 + v_89 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_89.x < v_01.x); @@ -500,8 +496,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_01.x = v0; - v_01.y = v1; v_1011.x = v10; v_1011.y = v11; v_01 = v_01 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_1011.x < v_01.x); @@ -537,8 +531,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { v11 = (xor1 >> 24u) ^ (xor0 << 8u); // a = a + b - v_01.x = v0; - v_01.y = v1; v_1011.x = v10; v_1011.y = v11; v_01 = v_01 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_1011.x < v_01.x); @@ -874,8 +866,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_01.x = v0; - v_01.y = v1; v_89.x = v8; v_89.y = v9; v_01 = v_01 + v_89 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_89.x < v_01.x); @@ -911,8 +901,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { v9 = (xor1 >> 24u) ^ (xor0 << 8u); // a = a + b - v_01.x = v0; - v_01.y = v1; v_89.x = v8; v_89.y = v9; v_01 = v_01 + v_89 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_89.x < v_01.x); @@ -1241,8 +1229,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_01.x = v0; - v_01.y = v1; v_1011.x = v10; v_1011.y = v11; v_01 = v_01 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_1011.x < v_01.x); @@ -1284,8 +1270,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { v11 = (xor1 >> 24u) ^ (xor0 << 8u); // a = a + b - v_01.x = v0; - v_01.y = v1; v_1011.x = v10; v_1011.y = v11; v_01 = v_01 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_1011.x < v_01.x); @@ -1612,8 +1596,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_01.x = v0; - v_01.y = v1; v_89.x = v8; v_89.y = v9; v_01 = v_01 + v_89 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_89.x < v_01.x); @@ -1649,8 +1631,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { v9 = (xor1 >> 24u) ^ (xor0 << 8u); // a = a + b - v_01.x = v0; - v_01.y = v1; v_89.x = v8; v_89.y = v9; v_01 = v_01 + v_89 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_89.x < v_01.x); @@ -1976,8 +1956,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_01.x = v0; - v_01.y = v1; v_1011.x = v10; v_1011.y = v11; v_01 = v_01 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_1011.x < v_01.x); @@ -2013,8 +1991,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { v11 = (xor1 >> 24u) ^ (xor0 << 8u); // a = a + b - v_01.x = v0; - v_01.y = v1; v_1011.x = v10; v_1011.y = v11; v_01 = v_01 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_1011.x < v_01.x); @@ -2341,8 +2317,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_01.x = v0; - v_01.y = v1; v_89.x = v8; v_89.y = v9; v_01 = v_01 + v_89 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_89.x < v_01.x); @@ -2378,8 +2352,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { v9 = (xor1 >> 24u) ^ (xor0 << 8u); // a = a + b - v_01.x = v0; - v_01.y = v1; v_89.x = v8; v_89.y = v9; v_01 = v_01 + v_89 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_89.x < v_01.x); @@ -2705,8 +2677,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_01.x = v0; - v_01.y = v1; v_1011.x = v10; v_1011.y = v11; v_01 = v_01 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_1011.x < v_01.x); @@ -2748,8 +2718,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { v11 = (xor1 >> 24u) ^ (xor0 << 8u); // a = a + b - v_01.x = v0; - v_01.y = v1; v_1011.x = v10; v_1011.y = v11; v_01 = v_01 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_1011.x < v_01.x); @@ -3079,8 +3047,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_01.x = v0; - v_01.y = v1; v_89.x = v8; v_89.y = v9; v_01 = v_01 + v_89 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_89.x < v_01.x); @@ -3116,8 +3082,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { v9 = (xor1 >> 24u) ^ (xor0 << 8u); // a = a + b - v_01.x = v0; - v_01.y = v1; v_89.x = v8; v_89.y = v9; v_01 = v_01 + v_89 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_89.x < v_01.x); @@ -3449,8 +3413,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_01.x = v0; - v_01.y = v1; v_1011.x = v10; v_1011.y = v11; v_01 = v_01 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_1011.x < v_01.x); @@ -3486,8 +3448,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { v11 = (xor1 >> 24u) ^ (xor0 << 8u); // a = a + b - v_01.x = v0; - v_01.y = v1; v_1011.x = v10; v_1011.y = v11; v_01 = v_01 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_1011.x < v_01.x); @@ -3826,8 +3786,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_01.x = v0; - v_01.y = v1; v_89.x = v8; v_89.y = v9; v_01 = v_01 + v_89 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_89.x < v_01.x); @@ -3869,8 +3827,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { v9 = (xor1 >> 24u) ^ (xor0 << 8u); // a = a + b - v_01.x = v0; - v_01.y = v1; v_89.x = v8; v_89.y = v9; v_01 = v_01 + v_89 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_89.x < v_01.x); @@ -4196,8 +4152,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_01.x = v0; - v_01.y = v1; v_1011.x = v10; v_1011.y = v11; v_01 = v_01 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_1011.x < v_01.x); @@ -4239,8 +4193,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { v11 = (xor1 >> 24u) ^ (xor0 << 8u); // a = a + b - v_01.x = v0; - v_01.y = v1; v_1011.x = v10; v_1011.y = v11; v_01 = v_01 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_1011.x < v_01.x); @@ -4573,8 +4525,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_01.x = v0; - v_01.y = v1; v_89.x = v8; v_89.y = v9; v_01 = v_01 + v_89 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_89.x < v_01.x); @@ -4610,8 +4560,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { v9 = (xor1 >> 24u) ^ (xor0 << 8u); // a = a + b - v_01.x = v0; - v_01.y = v1; v_89.x = v8; v_89.y = v9; v_01 = v_01 + v_89 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_89.x < v_01.x); @@ -4937,8 +4885,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_01.x = v0; - v_01.y = v1; v_1011.x = v10; v_1011.y = v11; v_01 = v_01 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_1011.x < v_01.x); @@ -4980,8 +4926,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { v11 = (xor1 >> 24u) ^ (xor0 << 8u); // a = a + b - v_01.x = v0; - v_01.y = v1; v_1011.x = v10; v_1011.y = v11; v_01 = v_01 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_1011.x < v_01.x); @@ -5311,8 +5255,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_01.x = v0; - v_01.y = v1; v_89.x = v8; v_89.y = v9; v_01 = v_01 + v_89 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_89.x < v_01.x); @@ -5348,8 +5290,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { v9 = (xor1 >> 24u) ^ (xor0 << 8u); // a = a + b - v_01.x = v0; - v_01.y = v1; v_89.x = v8; v_89.y = v9; v_01 = v_01 + v_89 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_89.x < v_01.x); @@ -5675,8 +5615,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_01.x = v0; - v_01.y = v1; v_1011.x = v10; v_1011.y = v11; v_01 = v_01 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_1011.x < v_01.x); @@ -5712,8 +5650,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { v11 = (xor1 >> 24u) ^ (xor0 << 8u); // a = a + b - v_01.x = v0; - v_01.y = v1; v_1011.x = v10; v_1011.y = v11; v_01 = v_01 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_1011.x < v_01.x); @@ -6049,8 +5985,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_01.x = v0; - v_01.y = v1; v_89.x = v8; v_89.y = v9; v_01 = v_01 + v_89 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_89.x < v_01.x); @@ -6086,8 +6020,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { v9 = (xor1 >> 24u) ^ (xor0 << 8u); // a = a + b - v_01.x = v0; - v_01.y = v1; v_89.x = v8; v_89.y = v9; v_01 = v_01 + v_89 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_89.x < v_01.x); @@ -6413,8 +6345,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_01.x = v0; - v_01.y = v1; v_1011.x = v10; v_1011.y = v11; v_01 = v_01 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_1011.x < v_01.x); @@ -6450,8 +6380,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { v11 = (xor1 >> 24u) ^ (xor0 << 8u); // a = a + b - v_01.x = v0; - v_01.y = v1; v_1011.x = v10; v_1011.y = v11; v_01 = v_01 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_1011.x < v_01.x); @@ -6787,8 +6715,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_01.x = v0; - v_01.y = v1; v_89.x = v8; v_89.y = v9; v_01 = v_01 + v_89 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_89.x < v_01.x); @@ -6824,8 +6750,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { v9 = (xor1 >> 24u) ^ (xor0 << 8u); // a = a + b - v_01.x = v0; - v_01.y = v1; v_89.x = v8; v_89.y = v9; v_01 = v_01 + v_89 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_89.x < v_01.x); @@ -7157,8 +7081,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_01.x = v0; - v_01.y = v1; v_1011.x = v10; v_1011.y = v11; v_01 = v_01 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_1011.x < v_01.x); @@ -7194,8 +7116,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { v11 = (xor1 >> 24u) ^ (xor0 << 8u); // a = a + b - v_01.x = v0; - v_01.y = v1; v_1011.x = v10; v_1011.y = v11; v_01 = v_01 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_1011.x < v_01.x); @@ -7525,8 +7445,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_01.x = v0; - v_01.y = v1; v_89.x = v8; v_89.y = v9; v_01 = v_01 + v_89 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_89.x < v_01.x); @@ -7568,8 +7486,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { v9 = (xor1 >> 24u) ^ (xor0 << 8u); // a = a + b - v_01.x = v0; - v_01.y = v1; v_89.x = v8; v_89.y = v9; v_01 = v_01 + v_89 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_89.x < v_01.x); @@ -7898,8 +7814,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_01.x = v0; - v_01.y = v1; v_1011.x = v10; v_1011.y = v11; v_01 = v_01 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_1011.x < v_01.x); @@ -7935,8 +7849,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { v11 = (xor1 >> 24u) ^ (xor0 << 8u); // a = a + b - v_01.x = v0; - v_01.y = v1; v_1011.x = v10; v_1011.y = v11; v_01 = v_01 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_1011.x < v_01.x); @@ -8272,8 +8184,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_01.x = v0; - v_01.y = v1; v_89.x = v8; v_89.y = v9; v_01 = v_01 + v_89 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_89.x < v_01.x); @@ -8309,8 +8219,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { v9 = (xor1 >> 24u) ^ (xor0 << 8u); // a = a + b - v_01.x = v0; - v_01.y = v1; v_89.x = v8; v_89.y = v9; v_01 = v_01 + v_89 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_89.x < v_01.x); @@ -8639,8 +8547,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_01.x = v0; - v_01.y = v1; v_1011.x = v10; v_1011.y = v11; v_01 = v_01 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_1011.x < v_01.x); @@ -8682,8 +8588,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { v11 = (xor1 >> 24u) ^ (xor0 << 8u); // a = a + b - v_01.x = v0; - v_01.y = v1; v_1011.x = v10; v_1011.y = v11; v_01 = v_01 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_01.x + v_1011.x < v_01.x);