From 383e239bf97c23f60df8ae074a8aafae9ffa9e67 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Thu, 16 Jan 2025 05:54:44 -0800 Subject: [PATCH] Replace constructors of vector constants with actual constants. --- src/shaders/compute.wgsl | 585 ++++++++++++++++++++------------------- 1 file changed, 297 insertions(+), 288 deletions(-) diff --git a/src/shaders/compute.wgsl b/src/shaders/compute.wgsl index 6629595..94a52c1 100644 --- a/src/shaders/compute.wgsl +++ b/src/shaders/compute.wgsl @@ -20,6 +20,15 @@ struct WORK { */ const BLAKE2B_IV32_1: u32 = 0x6A09E667u; +/** +* Used to rotate bits by a fixed amount during G mixing. +*/ +const ROTATE_1 = vec2(1u, 1u); +const ROTATE_8 = vec2(8u, 8u); +const ROTATE_16 = vec2(16u, 16u); +const ROTATE_24 = vec2(24u, 24u); +const ROTATE_31 = vec2(31u, 31u); + /** * Search compute function * Calls main with a workgroup size of 64 which has been tested as optimal @@ -125,7 +134,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v4 ^ v8; - v4 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v4 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v0 = v0 + v4 + vec2(0u, u32(v0.x + v4.x < v0.x)); @@ -135,14 +144,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v12 ^ v0; - v12 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v12 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v8 = v8 + v12 + vec2(0u, u32(v8.x + v12.x < v8.x)); // b = rotr64(b ^ c, 63) xor = v4 ^ v8; - v4 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v4 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -166,7 +175,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v5 ^ v9; - v5 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v5 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v1 = v1 + v5 + vec2(0u, u32(v1.x + v5.x < v1.x)); @@ -176,14 +185,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v1; - v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v13 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v9 = v9 + v13 + vec2(0u, u32(v9.x + v13.x < v9.x)); // b = rotr64(b ^ c, 63) xor = v5 ^ v9; - v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v5 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -207,7 +216,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v6 ^ v10; - v6 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v6 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v2 = v2 + v6 + vec2(0u, u32(v2.x + v6.x < v2.x)); @@ -217,14 +226,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v2; - v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v14 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v10 = v10 + v14 + vec2(0u, u32(v10.x + v14.x < v10.x)); // b = rotr64(b ^ c, 63) xor = v6 ^ v10; - v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v6 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -248,7 +257,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v7 ^ v11; - v7 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v7 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v3 = v3 + v7 + vec2(0u, u32(v3.x + v7.x < v3.x)); @@ -258,14 +267,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v3; - v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v15 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v11 = v11 + v15 + vec2(0u, u32(v11.x + v15.x < v11.x)); // b = rotr64(b ^ c, 63) xor = v7 ^ v11; - v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v7 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -289,7 +298,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v5 ^ v10; - v5 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v5 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v0 = v0 + v5 + vec2(0u, u32(v0.x + v5.x < v0.x)); @@ -299,14 +308,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v0; - v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v15 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v10 = v10 + v15 + vec2(0u, u32(v10.x + v15.x < v10.x)); // b = rotr64(b ^ c, 63) xor = v5 ^ v10; - v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v5 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -330,7 +339,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v6 ^ v11; - v6 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v6 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v1 = v1 + v6 + vec2(0u, u32(v1.x + v6.x < v1.x)); @@ -340,14 +349,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v12 ^ v1; - v12 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v12 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v11 = v11 + v12 + vec2(0u, u32(v11.x + v12.x < v11.x)); // b = rotr64(b ^ c, 63) xor = v6 ^ v11; - v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v6 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -371,7 +380,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v7 ^ v8; - v7 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v7 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v2 = v2 + v7 + vec2(0u, u32(v2.x + v7.x < v2.x)); @@ -381,14 +390,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v2; - v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v13 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v8 = v8 + v13 + vec2(0u, u32(v8.x + v13.x < v8.x)); // b = rotr64(b ^ c, 63) xor = v7 ^ v8; - v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v7 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -412,7 +421,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v4 ^ v9; - v4 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v4 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v3 = v3 + v4 + vec2(0u, u32(v3.x + v4.x < v3.x)); @@ -422,14 +431,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v3; - v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v14 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v9 = v9 + v14 + vec2(0u, u32(v9.x + v14.x < v9.x)); // b = rotr64(b ^ c, 63) xor = v4 ^ v9; - v4 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v4 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -457,7 +466,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v4 ^ v8; - v4 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v4 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v0 = v0 + v4 + vec2(0u, u32(v0.x + v4.x < v0.x)); @@ -467,14 +476,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v12 ^ v0; - v12 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v12 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v8 = v8 + v12 + vec2(0u, u32(v8.x + v12.x < v8.x)); // b = rotr64(b ^ c, 63) xor = v4 ^ v8; - v4 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v4 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -498,7 +507,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v5 ^ v9; - v5 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v5 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v1 = v1 + v5 + vec2(0u, u32(v1.x + v5.x < v1.x)); @@ -508,14 +517,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v1; - v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v13 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v9 = v9 + v13 + vec2(0u, u32(v9.x + v13.x < v9.x)); // b = rotr64(b ^ c, 63) xor = v5 ^ v9; - v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v5 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -539,7 +548,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v6 ^ v10; - v6 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v6 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v2 = v2 + v6 + vec2(0u, u32(v2.x + v6.x < v2.x)); @@ -549,14 +558,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v2; - v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v14 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v10 = v10 + v14 + vec2(0u, u32(v10.x + v14.x < v10.x)); // b = rotr64(b ^ c, 63) xor = v6 ^ v10; - v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v6 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -580,7 +589,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v7 ^ v11; - v7 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v7 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v3 = v3 + v7 + vec2(0u, u32(v3.x + v7.x < v3.x)); @@ -590,14 +599,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v3; - v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v15 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v11 = v11 + v15 + vec2(0u, u32(v11.x + v15.x < v11.x)); // b = rotr64(b ^ c, 63) xor = v7 ^ v11; - v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v7 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -621,7 +630,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v5 ^ v10; - v5 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v5 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v0 = v0 + v5 + vec2(0u, u32(v0.x + v5.x < v0.x)); @@ -631,14 +640,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v0; - v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v15 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v10 = v10 + v15 + vec2(0u, u32(v10.x + v15.x < v10.x)); // b = rotr64(b ^ c, 63) xor = v5 ^ v10; - v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v5 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -662,7 +671,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v6 ^ v11; - v6 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v6 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v1 = v1 + v6 + vec2(0u, u32(v1.x + v6.x < v1.x)); @@ -672,14 +681,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v12 ^ v1; - v12 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v12 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v11 = v11 + v12 + vec2(0u, u32(v11.x + v12.x < v11.x)); // b = rotr64(b ^ c, 63) xor = v6 ^ v11; - v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v6 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -703,7 +712,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v7 ^ v8; - v7 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v7 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v2 = v2 + v7 + vec2(0u, u32(v2.x + v7.x < v2.x)); @@ -713,14 +722,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v2; - v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v13 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v8 = v8 + v13 + vec2(0u, u32(v8.x + v13.x < v8.x)); // b = rotr64(b ^ c, 63) xor = v7 ^ v8; - v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v7 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -744,7 +753,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v4 ^ v9; - v4 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v4 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v3 = v3 + v4 + vec2(0u, u32(v3.x + v4.x < v3.x)); @@ -754,14 +763,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v3; - v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v14 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v9 = v9 + v14 + vec2(0u, u32(v9.x + v14.x < v9.x)); // b = rotr64(b ^ c, 63) xor = v4 ^ v9; - v4 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v4 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -789,7 +798,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v4 ^ v8; - v4 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v4 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v0 = v0 + v4 + vec2(0u, u32(v0.x + v4.x < v0.x)); @@ -799,14 +808,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v12 ^ v0; - v12 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v12 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v8 = v8 + v12 + vec2(0u, u32(v8.x + v12.x < v8.x)); // b = rotr64(b ^ c, 63) xor = v4 ^ v8; - v4 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v4 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -830,7 +839,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v5 ^ v9; - v5 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v5 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v1 = v1 + v5 + vec2(0u, u32(v1.x + v5.x < v1.x)); @@ -840,14 +849,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v1; - v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v13 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v9 = v9 + v13 + vec2(0u, u32(v9.x + v13.x < v9.x)); // b = rotr64(b ^ c, 63) xor = v5 ^ v9; - v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v5 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -871,7 +880,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v6 ^ v10; - v6 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v6 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v2 = v2 + v6 + vec2(0u, u32(v2.x + v6.x < v2.x)); @@ -881,14 +890,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v2; - v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v14 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v10 = v10 + v14 + vec2(0u, u32(v10.x + v14.x < v10.x)); // b = rotr64(b ^ c, 63) xor = v6 ^ v10; - v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v6 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -912,7 +921,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v7 ^ v11; - v7 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v7 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v3 = v3 + v7 + vec2(0u, u32(v3.x + v7.x < v3.x)); @@ -922,14 +931,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v3; - v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v15 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v11 = v11 + v15 + vec2(0u, u32(v11.x + v15.x < v11.x)); // b = rotr64(b ^ c, 63) xor = v7 ^ v11; - v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v7 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -953,7 +962,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v5 ^ v10; - v5 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v5 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v0 = v0 + v5 + vec2(0u, u32(v0.x + v5.x < v0.x)); @@ -963,14 +972,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v0; - v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v15 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v10 = v10 + v15 + vec2(0u, u32(v10.x + v15.x < v10.x)); // b = rotr64(b ^ c, 63) xor = v5 ^ v10; - v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v5 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -994,7 +1003,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v6 ^ v11; - v6 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v6 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v1 = v1 + v6 + vec2(0u, u32(v1.x + v6.x < v1.x)); @@ -1004,14 +1013,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v12 ^ v1; - v12 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v12 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v11 = v11 + v12 + vec2(0u, u32(v11.x + v12.x < v11.x)); // b = rotr64(b ^ c, 63) xor = v6 ^ v11; - v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v6 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -1035,7 +1044,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v7 ^ v8; - v7 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v7 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v2 = v2 + v7 + vec2(0u, u32(v2.x + v7.x < v2.x)); @@ -1045,14 +1054,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v2; - v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v13 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v8 = v8 + v13 + vec2(0u, u32(v8.x + v13.x < v8.x)); // b = rotr64(b ^ c, 63) xor = v7 ^ v8; - v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v7 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -1076,7 +1085,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v4 ^ v9; - v4 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v4 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v3 = v3 + v4 + vec2(0u, u32(v3.x + v4.x < v3.x)); @@ -1086,14 +1095,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v3; - v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v14 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v9 = v9 + v14 + vec2(0u, u32(v9.x + v14.x < v9.x)); // b = rotr64(b ^ c, 63) xor = v4 ^ v9; - v4 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v4 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -1121,7 +1130,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v4 ^ v8; - v4 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v4 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v0 = v0 + v4 + vec2(0u, u32(v0.x + v4.x < v0.x)); @@ -1131,14 +1140,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v12 ^ v0; - v12 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v12 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v8 = v8 + v12 + vec2(0u, u32(v8.x + v12.x < v8.x)); // b = rotr64(b ^ c, 63) xor = v4 ^ v8; - v4 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v4 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -1162,7 +1171,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v5 ^ v9; - v5 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v5 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v1 = v1 + v5 + vec2(0u, u32(v1.x + v5.x < v1.x)); @@ -1172,14 +1181,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v1; - v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v13 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v9 = v9 + v13 + vec2(0u, u32(v9.x + v13.x < v9.x)); // b = rotr64(b ^ c, 63) xor = v5 ^ v9; - v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v5 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -1203,7 +1212,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v6 ^ v10; - v6 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v6 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v2 = v2 + v6 + vec2(0u, u32(v2.x + v6.x < v2.x)); @@ -1213,14 +1222,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v2; - v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v14 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v10 = v10 + v14 + vec2(0u, u32(v10.x + v14.x < v10.x)); // b = rotr64(b ^ c, 63) xor = v6 ^ v10; - v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v6 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -1244,7 +1253,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v7 ^ v11; - v7 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v7 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v3 = v3 + v7 + vec2(0u, u32(v3.x + v7.x < v3.x)); @@ -1254,14 +1263,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v3; - v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v15 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v11 = v11 + v15 + vec2(0u, u32(v11.x + v15.x < v11.x)); // b = rotr64(b ^ c, 63) xor = v7 ^ v11; - v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v7 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -1285,7 +1294,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v5 ^ v10; - v5 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v5 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v0 = v0 + v5 + vec2(0u, u32(v0.x + v5.x < v0.x)); @@ -1295,14 +1304,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v0; - v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v15 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v10 = v10 + v15 + vec2(0u, u32(v10.x + v15.x < v10.x)); // b = rotr64(b ^ c, 63) xor = v5 ^ v10; - v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v5 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -1326,7 +1335,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v6 ^ v11; - v6 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v6 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v1 = v1 + v6 + vec2(0u, u32(v1.x + v6.x < v1.x)); @@ -1336,14 +1345,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v12 ^ v1; - v12 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v12 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v11 = v11 + v12 + vec2(0u, u32(v11.x + v12.x < v11.x)); // b = rotr64(b ^ c, 63) xor = v6 ^ v11; - v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v6 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -1367,7 +1376,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v7 ^ v8; - v7 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v7 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v2 = v2 + v7 + vec2(0u, u32(v2.x + v7.x < v2.x)); @@ -1377,14 +1386,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v2; - v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v13 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v8 = v8 + v13 + vec2(0u, u32(v8.x + v13.x < v8.x)); // b = rotr64(b ^ c, 63) xor = v7 ^ v8; - v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v7 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -1408,7 +1417,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v4 ^ v9; - v4 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v4 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v3 = v3 + v4 + vec2(0u, u32(v3.x + v4.x < v3.x)); @@ -1418,14 +1427,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v3; - v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v14 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v9 = v9 + v14 + vec2(0u, u32(v9.x + v14.x < v9.x)); // b = rotr64(b ^ c, 63) xor = v4 ^ v9; - v4 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v4 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -1453,7 +1462,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v4 ^ v8; - v4 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v4 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v0 = v0 + v4 + vec2(0u, u32(v0.x + v4.x < v0.x)); @@ -1463,14 +1472,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v12 ^ v0; - v12 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v12 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v8 = v8 + v12 + vec2(0u, u32(v8.x + v12.x < v8.x)); // b = rotr64(b ^ c, 63) xor = v4 ^ v8; - v4 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v4 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -1494,7 +1503,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v5 ^ v9; - v5 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v5 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v1 = v1 + v5 + vec2(0u, u32(v1.x + v5.x < v1.x)); @@ -1504,14 +1513,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v1; - v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v13 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v9 = v9 + v13 + vec2(0u, u32(v9.x + v13.x < v9.x)); // b = rotr64(b ^ c, 63) xor = v5 ^ v9; - v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v5 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -1535,7 +1544,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v6 ^ v10; - v6 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v6 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v2 = v2 + v6 + vec2(0u, u32(v2.x + v6.x < v2.x)); @@ -1545,14 +1554,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v2; - v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v14 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v10 = v10 + v14 + vec2(0u, u32(v10.x + v14.x < v10.x)); // b = rotr64(b ^ c, 63) xor = v6 ^ v10; - v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v6 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -1576,7 +1585,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v7 ^ v11; - v7 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v7 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v3 = v3 + v7 + vec2(0u, u32(v3.x + v7.x < v3.x)); @@ -1586,14 +1595,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v3; - v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v15 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v11 = v11 + v15 + vec2(0u, u32(v11.x + v15.x < v11.x)); // b = rotr64(b ^ c, 63) xor = v7 ^ v11; - v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v7 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -1617,7 +1626,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v5 ^ v10; - v5 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v5 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v0 = v0 + v5 + vec2(0u, u32(v0.x + v5.x < v0.x)); @@ -1627,14 +1636,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v0; - v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v15 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v10 = v10 + v15 + vec2(0u, u32(v10.x + v15.x < v10.x)); // b = rotr64(b ^ c, 63) xor = v5 ^ v10; - v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v5 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -1658,7 +1667,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v6 ^ v11; - v6 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v6 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v1 = v1 + v6 + vec2(0u, u32(v1.x + v6.x < v1.x)); @@ -1668,14 +1677,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v12 ^ v1; - v12 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v12 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v11 = v11 + v12 + vec2(0u, u32(v11.x + v12.x < v11.x)); // b = rotr64(b ^ c, 63) xor = v6 ^ v11; - v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v6 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -1699,7 +1708,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v7 ^ v8; - v7 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v7 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v2 = v2 + v7 + vec2(0u, u32(v2.x + v7.x < v2.x)); @@ -1709,14 +1718,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v2; - v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v13 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v8 = v8 + v13 + vec2(0u, u32(v8.x + v13.x < v8.x)); // b = rotr64(b ^ c, 63) xor = v7 ^ v8; - v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v7 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -1740,7 +1749,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v4 ^ v9; - v4 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v4 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v3 = v3 + v4 + vec2(0u, u32(v3.x + v4.x < v3.x)); @@ -1750,14 +1759,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v3; - v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v14 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v9 = v9 + v14 + vec2(0u, u32(v9.x + v14.x < v9.x)); // b = rotr64(b ^ c, 63) xor = v4 ^ v9; - v4 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v4 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -1785,7 +1794,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v4 ^ v8; - v4 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v4 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v0 = v0 + v4 + vec2(0u, u32(v0.x + v4.x < v0.x)); @@ -1795,14 +1804,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v12 ^ v0; - v12 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v12 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v8 = v8 + v12 + vec2(0u, u32(v8.x + v12.x < v8.x)); // b = rotr64(b ^ c, 63) xor = v4 ^ v8; - v4 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v4 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -1826,7 +1835,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v5 ^ v9; - v5 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v5 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v1 = v1 + v5 + vec2(0u, u32(v1.x + v5.x < v1.x)); @@ -1836,14 +1845,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v1; - v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v13 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v9 = v9 + v13 + vec2(0u, u32(v9.x + v13.x < v9.x)); // b = rotr64(b ^ c, 63) xor = v5 ^ v9; - v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v5 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -1867,7 +1876,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v6 ^ v10; - v6 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v6 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v2 = v2 + v6 + vec2(0u, u32(v2.x + v6.x < v2.x)); @@ -1877,14 +1886,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v2; - v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v14 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v10 = v10 + v14 + vec2(0u, u32(v10.x + v14.x < v10.x)); // b = rotr64(b ^ c, 63) xor = v6 ^ v10; - v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v6 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -1908,7 +1917,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v7 ^ v11; - v7 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v7 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v3 = v3 + v7 + vec2(0u, u32(v3.x + v7.x < v3.x)); @@ -1918,14 +1927,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v3; - v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v15 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v11 = v11 + v15 + vec2(0u, u32(v11.x + v15.x < v11.x)); // b = rotr64(b ^ c, 63) xor = v7 ^ v11; - v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v7 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -1949,7 +1958,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v5 ^ v10; - v5 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v5 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v0 = v0 + v5 + vec2(0u, u32(v0.x + v5.x < v0.x)); @@ -1959,14 +1968,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v0; - v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v15 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v10 = v10 + v15 + vec2(0u, u32(v10.x + v15.x < v10.x)); // b = rotr64(b ^ c, 63) xor = v5 ^ v10; - v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v5 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -1990,7 +1999,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v6 ^ v11; - v6 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v6 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v1 = v1 + v6 + vec2(0u, u32(v1.x + v6.x < v1.x)); @@ -2000,14 +2009,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v12 ^ v1; - v12 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v12 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v11 = v11 + v12 + vec2(0u, u32(v11.x + v12.x < v11.x)); // b = rotr64(b ^ c, 63) xor = v6 ^ v11; - v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v6 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -2031,7 +2040,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v7 ^ v8; - v7 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v7 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v2 = v2 + v7 + vec2(0u, u32(v2.x + v7.x < v2.x)); @@ -2041,14 +2050,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v2; - v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v13 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v8 = v8 + v13 + vec2(0u, u32(v8.x + v13.x < v8.x)); // b = rotr64(b ^ c, 63) xor = v7 ^ v8; - v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v7 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -2072,7 +2081,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v4 ^ v9; - v4 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v4 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v3 = v3 + v4 + vec2(0u, u32(v3.x + v4.x < v3.x)); @@ -2082,14 +2091,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v3; - v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v14 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v9 = v9 + v14 + vec2(0u, u32(v9.x + v14.x < v9.x)); // b = rotr64(b ^ c, 63) xor = v4 ^ v9; - v4 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v4 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -2117,7 +2126,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v4 ^ v8; - v4 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v4 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v0 = v0 + v4 + vec2(0u, u32(v0.x + v4.x < v0.x)); @@ -2127,14 +2136,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v12 ^ v0; - v12 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v12 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v8 = v8 + v12 + vec2(0u, u32(v8.x + v12.x < v8.x)); // b = rotr64(b ^ c, 63) xor = v4 ^ v8; - v4 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v4 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -2158,7 +2167,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v5 ^ v9; - v5 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v5 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v1 = v1 + v5 + vec2(0u, u32(v1.x + v5.x < v1.x)); @@ -2168,14 +2177,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v1; - v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v13 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v9 = v9 + v13 + vec2(0u, u32(v9.x + v13.x < v9.x)); // b = rotr64(b ^ c, 63) xor = v5 ^ v9; - v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v5 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -2199,7 +2208,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v6 ^ v10; - v6 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v6 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v2 = v2 + v6 + vec2(0u, u32(v2.x + v6.x < v2.x)); @@ -2209,14 +2218,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v2; - v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v14 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v10 = v10 + v14 + vec2(0u, u32(v10.x + v14.x < v10.x)); // b = rotr64(b ^ c, 63) xor = v6 ^ v10; - v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v6 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -2240,7 +2249,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v7 ^ v11; - v7 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v7 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v3 = v3 + v7 + vec2(0u, u32(v3.x + v7.x < v3.x)); @@ -2250,14 +2259,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v3; - v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v15 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v11 = v11 + v15 + vec2(0u, u32(v11.x + v15.x < v11.x)); // b = rotr64(b ^ c, 63) xor = v7 ^ v11; - v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v7 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -2281,7 +2290,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v5 ^ v10; - v5 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v5 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v0 = v0 + v5 + vec2(0u, u32(v0.x + v5.x < v0.x)); @@ -2291,14 +2300,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v0; - v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v15 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v10 = v10 + v15 + vec2(0u, u32(v10.x + v15.x < v10.x)); // b = rotr64(b ^ c, 63) xor = v5 ^ v10; - v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v5 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -2322,7 +2331,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v6 ^ v11; - v6 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v6 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v1 = v1 + v6 + vec2(0u, u32(v1.x + v6.x < v1.x)); @@ -2332,14 +2341,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v12 ^ v1; - v12 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v12 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v11 = v11 + v12 + vec2(0u, u32(v11.x + v12.x < v11.x)); // b = rotr64(b ^ c, 63) xor = v6 ^ v11; - v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v6 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -2363,7 +2372,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v7 ^ v8; - v7 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v7 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v2 = v2 + v7 + vec2(0u, u32(v2.x + v7.x < v2.x)); @@ -2373,14 +2382,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v2; - v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v13 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v8 = v8 + v13 + vec2(0u, u32(v8.x + v13.x < v8.x)); // b = rotr64(b ^ c, 63) xor = v7 ^ v8; - v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v7 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -2404,7 +2413,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v4 ^ v9; - v4 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v4 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v3 = v3 + v4 + vec2(0u, u32(v3.x + v4.x < v3.x)); @@ -2414,14 +2423,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v3; - v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v14 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v9 = v9 + v14 + vec2(0u, u32(v9.x + v14.x < v9.x)); // b = rotr64(b ^ c, 63) xor = v4 ^ v9; - v4 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v4 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -2449,7 +2458,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v4 ^ v8; - v4 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v4 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v0 = v0 + v4 + vec2(0u, u32(v0.x + v4.x < v0.x)); @@ -2459,14 +2468,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v12 ^ v0; - v12 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v12 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v8 = v8 + v12 + vec2(0u, u32(v8.x + v12.x < v8.x)); // b = rotr64(b ^ c, 63) xor = v4 ^ v8; - v4 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v4 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -2490,7 +2499,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v5 ^ v9; - v5 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v5 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v1 = v1 + v5 + vec2(0u, u32(v1.x + v5.x < v1.x)); @@ -2500,14 +2509,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v1; - v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v13 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v9 = v9 + v13 + vec2(0u, u32(v9.x + v13.x < v9.x)); // b = rotr64(b ^ c, 63) xor = v5 ^ v9; - v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v5 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -2531,7 +2540,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v6 ^ v10; - v6 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v6 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v2 = v2 + v6 + vec2(0u, u32(v2.x + v6.x < v2.x)); @@ -2541,14 +2550,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v2; - v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v14 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v10 = v10 + v14 + vec2(0u, u32(v10.x + v14.x < v10.x)); // b = rotr64(b ^ c, 63) xor = v6 ^ v10; - v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v6 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -2572,7 +2581,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v7 ^ v11; - v7 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v7 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v3 = v3 + v7 + vec2(0u, u32(v3.x + v7.x < v3.x)); @@ -2582,14 +2591,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v3; - v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v15 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v11 = v11 + v15 + vec2(0u, u32(v11.x + v15.x < v11.x)); // b = rotr64(b ^ c, 63) xor = v7 ^ v11; - v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v7 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -2613,7 +2622,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v5 ^ v10; - v5 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v5 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v0 = v0 + v5 + vec2(0u, u32(v0.x + v5.x < v0.x)); @@ -2623,14 +2632,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v0; - v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v15 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v10 = v10 + v15 + vec2(0u, u32(v10.x + v15.x < v10.x)); // b = rotr64(b ^ c, 63) xor = v5 ^ v10; - v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v5 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -2654,7 +2663,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v6 ^ v11; - v6 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v6 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v1 = v1 + v6 + vec2(0u, u32(v1.x + v6.x < v1.x)); @@ -2664,14 +2673,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v12 ^ v1; - v12 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v12 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v11 = v11 + v12 + vec2(0u, u32(v11.x + v12.x < v11.x)); // b = rotr64(b ^ c, 63) xor = v6 ^ v11; - v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v6 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -2695,7 +2704,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v7 ^ v8; - v7 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v7 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v2 = v2 + v7 + vec2(0u, u32(v2.x + v7.x < v2.x)); @@ -2705,14 +2714,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v2; - v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v13 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v8 = v8 + v13 + vec2(0u, u32(v8.x + v13.x < v8.x)); // b = rotr64(b ^ c, 63) xor = v7 ^ v8; - v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v7 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -2736,7 +2745,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v4 ^ v9; - v4 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v4 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v3 = v3 + v4 + vec2(0u, u32(v3.x + v4.x < v3.x)); @@ -2746,14 +2755,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v3; - v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v14 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v9 = v9 + v14 + vec2(0u, u32(v9.x + v14.x < v9.x)); // b = rotr64(b ^ c, 63) xor = v4 ^ v9; - v4 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v4 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -2781,7 +2790,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v4 ^ v8; - v4 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v4 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v0 = v0 + v4 + vec2(0u, u32(v0.x + v4.x < v0.x)); @@ -2791,14 +2800,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v12 ^ v0; - v12 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v12 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v8 = v8 + v12 + vec2(0u, u32(v8.x + v12.x < v8.x)); // b = rotr64(b ^ c, 63) xor = v4 ^ v8; - v4 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v4 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -2822,7 +2831,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v5 ^ v9; - v5 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v5 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v1 = v1 + v5 + vec2(0u, u32(v1.x + v5.x < v1.x)); @@ -2832,14 +2841,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v1; - v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v13 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v9 = v9 + v13 + vec2(0u, u32(v9.x + v13.x < v9.x)); // b = rotr64(b ^ c, 63) xor = v5 ^ v9; - v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v5 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -2863,7 +2872,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v6 ^ v10; - v6 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v6 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v2 = v2 + v6 + vec2(0u, u32(v2.x + v6.x < v2.x)); @@ -2873,14 +2882,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v2; - v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v14 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v10 = v10 + v14 + vec2(0u, u32(v10.x + v14.x < v10.x)); // b = rotr64(b ^ c, 63) xor = v6 ^ v10; - v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v6 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -2904,7 +2913,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v7 ^ v11; - v7 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v7 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v3 = v3 + v7 + vec2(0u, u32(v3.x + v7.x < v3.x)); @@ -2914,14 +2923,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v3; - v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v15 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v11 = v11 + v15 + vec2(0u, u32(v11.x + v15.x < v11.x)); // b = rotr64(b ^ c, 63) xor = v7 ^ v11; - v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v7 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -2945,7 +2954,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v5 ^ v10; - v5 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v5 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v0 = v0 + v5 + vec2(0u, u32(v0.x + v5.x < v0.x)); @@ -2955,14 +2964,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v0; - v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v15 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v10 = v10 + v15 + vec2(0u, u32(v10.x + v15.x < v10.x)); // b = rotr64(b ^ c, 63) xor = v5 ^ v10; - v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v5 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -2986,7 +2995,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v6 ^ v11; - v6 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v6 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v1 = v1 + v6 + vec2(0u, u32(v1.x + v6.x < v1.x)); @@ -2996,14 +3005,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v12 ^ v1; - v12 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v12 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v11 = v11 + v12 + vec2(0u, u32(v11.x + v12.x < v11.x)); // b = rotr64(b ^ c, 63) xor = v6 ^ v11; - v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v6 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -3027,7 +3036,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v7 ^ v8; - v7 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v7 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v2 = v2 + v7 + vec2(0u, u32(v2.x + v7.x < v2.x)); @@ -3037,14 +3046,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v2; - v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v13 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v8 = v8 + v13 + vec2(0u, u32(v8.x + v13.x < v8.x)); // b = rotr64(b ^ c, 63) xor = v7 ^ v8; - v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v7 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -3068,7 +3077,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v4 ^ v9; - v4 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v4 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v3 = v3 + v4 + vec2(0u, u32(v3.x + v4.x < v3.x)); @@ -3078,14 +3087,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v3; - v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v14 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v9 = v9 + v14 + vec2(0u, u32(v9.x + v14.x < v9.x)); // b = rotr64(b ^ c, 63) xor = v4 ^ v9; - v4 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v4 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -3113,7 +3122,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v4 ^ v8; - v4 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v4 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v0 = v0 + v4 + vec2(0u, u32(v0.x + v4.x < v0.x)); @@ -3123,14 +3132,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v12 ^ v0; - v12 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v12 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v8 = v8 + v12 + vec2(0u, u32(v8.x + v12.x < v8.x)); // b = rotr64(b ^ c, 63) xor = v4 ^ v8; - v4 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v4 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -3154,7 +3163,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v5 ^ v9; - v5 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v5 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v1 = v1 + v5 + vec2(0u, u32(v1.x + v5.x < v1.x)); @@ -3164,14 +3173,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v1; - v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v13 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v9 = v9 + v13 + vec2(0u, u32(v9.x + v13.x < v9.x)); // b = rotr64(b ^ c, 63) xor = v5 ^ v9; - v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v5 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -3195,7 +3204,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v6 ^ v10; - v6 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v6 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v2 = v2 + v6 + vec2(0u, u32(v2.x + v6.x < v2.x)); @@ -3205,14 +3214,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v2; - v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v14 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v10 = v10 + v14 + vec2(0u, u32(v10.x + v14.x < v10.x)); // b = rotr64(b ^ c, 63) xor = v6 ^ v10; - v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v6 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -3236,7 +3245,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v7 ^ v11; - v7 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v7 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v3 = v3 + v7 + vec2(0u, u32(v3.x + v7.x < v3.x)); @@ -3246,14 +3255,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v3; - v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v15 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v11 = v11 + v15 + vec2(0u, u32(v11.x + v15.x < v11.x)); // b = rotr64(b ^ c, 63) xor = v7 ^ v11; - v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v7 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -3277,7 +3286,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v5 ^ v10; - v5 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v5 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v0 = v0 + v5 + vec2(0u, u32(v0.x + v5.x < v0.x)); @@ -3287,14 +3296,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v0; - v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v15 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v10 = v10 + v15 + vec2(0u, u32(v10.x + v15.x < v10.x)); // b = rotr64(b ^ c, 63) xor = v5 ^ v10; - v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v5 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -3318,7 +3327,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v6 ^ v11; - v6 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v6 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v1 = v1 + v6 + vec2(0u, u32(v1.x + v6.x < v1.x)); @@ -3328,14 +3337,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v12 ^ v1; - v12 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v12 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v11 = v11 + v12 + vec2(0u, u32(v11.x + v12.x < v11.x)); // b = rotr64(b ^ c, 63) xor = v6 ^ v11; - v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v6 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -3359,7 +3368,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v7 ^ v8; - v7 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v7 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v2 = v2 + v7 + vec2(0u, u32(v2.x + v7.x < v2.x)); @@ -3369,14 +3378,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v2; - v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v13 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v8 = v8 + v13 + vec2(0u, u32(v8.x + v13.x < v8.x)); // b = rotr64(b ^ c, 63) xor = v7 ^ v8; - v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v7 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -3400,7 +3409,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v4 ^ v9; - v4 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v4 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v3 = v3 + v4 + vec2(0u, u32(v3.x + v4.x < v3.x)); @@ -3410,14 +3419,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v3; - v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v14 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v9 = v9 + v14 + vec2(0u, u32(v9.x + v14.x < v9.x)); // b = rotr64(b ^ c, 63) xor = v4 ^ v9; - v4 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v4 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -3445,7 +3454,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v4 ^ v8; - v4 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v4 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v0 = v0 + v4 + vec2(0u, u32(v0.x + v4.x < v0.x)); @@ -3455,14 +3464,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v12 ^ v0; - v12 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v12 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v8 = v8 + v12 + vec2(0u, u32(v8.x + v12.x < v8.x)); // b = rotr64(b ^ c, 63) xor = v4 ^ v8; - v4 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v4 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -3486,7 +3495,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v5 ^ v9; - v5 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v5 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v1 = v1 + v5 + vec2(0u, u32(v1.x + v5.x < v1.x)); @@ -3496,14 +3505,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v1; - v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v13 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v9 = v9 + v13 + vec2(0u, u32(v9.x + v13.x < v9.x)); // b = rotr64(b ^ c, 63) xor = v5 ^ v9; - v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v5 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -3527,7 +3536,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v6 ^ v10; - v6 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v6 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v2 = v2 + v6 + vec2(0u, u32(v2.x + v6.x < v2.x)); @@ -3537,14 +3546,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v2; - v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v14 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v10 = v10 + v14 + vec2(0u, u32(v10.x + v14.x < v10.x)); // b = rotr64(b ^ c, 63) xor = v6 ^ v10; - v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v6 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -3568,7 +3577,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v7 ^ v11; - v7 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v7 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v3 = v3 + v7 + vec2(0u, u32(v3.x + v7.x < v3.x)); @@ -3578,14 +3587,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v3; - v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v15 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v11 = v11 + v15 + vec2(0u, u32(v11.x + v15.x < v11.x)); // b = rotr64(b ^ c, 63) xor = v7 ^ v11; - v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v7 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -3609,7 +3618,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v5 ^ v10; - v5 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v5 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v0 = v0 + v5 + vec2(0u, u32(v0.x + v5.x < v0.x)); @@ -3619,14 +3628,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v0; - v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v15 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v10 = v10 + v15 + vec2(0u, u32(v10.x + v15.x < v10.x)); // b = rotr64(b ^ c, 63) xor = v5 ^ v10; - v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v5 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -3650,7 +3659,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v6 ^ v11; - v6 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v6 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v1 = v1 + v6 + vec2(0u, u32(v1.x + v6.x < v1.x)); @@ -3660,14 +3669,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v12 ^ v1; - v12 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v12 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v11 = v11 + v12 + vec2(0u, u32(v11.x + v12.x < v11.x)); // b = rotr64(b ^ c, 63) xor = v6 ^ v11; - v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v6 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -3691,7 +3700,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v7 ^ v8; - v7 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v7 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v2 = v2 + v7 + vec2(0u, u32(v2.x + v7.x < v2.x)); @@ -3701,14 +3710,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v2; - v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v13 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v8 = v8 + v13 + vec2(0u, u32(v8.x + v13.x < v8.x)); // b = rotr64(b ^ c, 63) xor = v7 ^ v8; - v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v7 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -3732,7 +3741,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v4 ^ v9; - v4 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v4 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v3 = v3 + v4 + vec2(0u, u32(v3.x + v4.x < v3.x)); @@ -3742,14 +3751,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v3; - v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v14 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v9 = v9 + v14 + vec2(0u, u32(v9.x + v14.x < v9.x)); // b = rotr64(b ^ c, 63) xor = v4 ^ v9; - v4 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v4 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -3777,7 +3786,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v4 ^ v8; - v4 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v4 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v0 = v0 + v4 + vec2(0u, u32(v0.x + v4.x < v0.x)); @@ -3787,14 +3796,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v12 ^ v0; - v12 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v12 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v8 = v8 + v12 + vec2(0u, u32(v8.x + v12.x < v8.x)); // b = rotr64(b ^ c, 63) xor = v4 ^ v8; - v4 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v4 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -3818,7 +3827,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v5 ^ v9; - v5 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v5 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v1 = v1 + v5 + vec2(0u, u32(v1.x + v5.x < v1.x)); @@ -3828,14 +3837,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v1; - v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v13 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v9 = v9 + v13 + vec2(0u, u32(v9.x + v13.x < v9.x)); // b = rotr64(b ^ c, 63) xor = v5 ^ v9; - v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v5 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -3859,7 +3868,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v6 ^ v10; - v6 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v6 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v2 = v2 + v6 + vec2(0u, u32(v2.x + v6.x < v2.x)); @@ -3869,14 +3878,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v2; - v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v14 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v10 = v10 + v14 + vec2(0u, u32(v10.x + v14.x < v10.x)); // b = rotr64(b ^ c, 63) xor = v6 ^ v10; - v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v6 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -3900,7 +3909,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v7 ^ v11; - v7 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v7 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v3 = v3 + v7 + vec2(0u, u32(v3.x + v7.x < v3.x)); @@ -3910,14 +3919,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v3; - v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v15 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v11 = v11 + v15 + vec2(0u, u32(v11.x + v15.x < v11.x)); // b = rotr64(b ^ c, 63) xor = v7 ^ v11; - v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v7 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -3941,7 +3950,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v5 ^ v10; - v5 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v5 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v0 = v0 + v5 + vec2(0u, u32(v0.x + v5.x < v0.x)); @@ -3951,14 +3960,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v0; - v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v15 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v10 = v10 + v15 + vec2(0u, u32(v10.x + v15.x < v10.x)); // b = rotr64(b ^ c, 63) xor = v5 ^ v10; - v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v5 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -3982,7 +3991,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v6 ^ v11; - v6 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v6 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v1 = v1 + v6 + vec2(0u, u32(v1.x + v6.x < v1.x)); @@ -3992,14 +4001,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v12 ^ v1; - v12 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v12 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v11 = v11 + v12 + vec2(0u, u32(v11.x + v12.x < v11.x)); // b = rotr64(b ^ c, 63) xor = v6 ^ v11; - v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v6 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -4023,7 +4032,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v7 ^ v8; - v7 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v7 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v2 = v2 + v7 + vec2(0u, u32(v2.x + v7.x < v2.x)); @@ -4033,14 +4042,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v2; - v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v13 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v8 = v8 + v13 + vec2(0u, u32(v8.x + v13.x < v8.x)); // b = rotr64(b ^ c, 63) xor = v7 ^ v8; - v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v7 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); @@ -4064,7 +4073,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 24) xor = v4 ^ v9; - v4 = vec2((xor.xy >> vec2(24u, 24u)) | (xor.yx << vec2(8u, 8u))); + v4 = vec2((xor.xy >> ROTATE_24) | (xor.yx << ROTATE_8)); // a = a + b v3 = v3 + v4 + vec2(0u, u32(v3.x + v4.x < v3.x)); @@ -4074,14 +4083,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v3; - v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); + v14 = vec2((xor.xy >> ROTATE_16) | (xor.yx << ROTATE_16)); // c = c + d v9 = v9 + v14 + vec2(0u, u32(v9.x + v14.x < v9.x)); // b = rotr64(b ^ c, 63) xor = v4 ^ v9; - v4 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); + v4 = vec2((xor.xy << ROTATE_1) | (xor.yx >> ROTATE_31)); -- 2.34.1