From c3c9158e28803d4c15cc1f8929566e101a7dd93e Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Thu, 16 Jan 2025 05:31:17 -0800 Subject: [PATCH] Replace 16 and 63 bit rotations with swizzle version. --- src/shaders/compute.wgsl | 290 +++++++++++++++++++-------------------- 1 file changed, 144 insertions(+), 146 deletions(-) diff --git a/src/shaders/compute.wgsl b/src/shaders/compute.wgsl index b63d95d..8cee7b9 100644 --- a/src/shaders/compute.wgsl +++ b/src/shaders/compute.wgsl @@ -178,16 +178,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v1; - // v12 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); - v13 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // c = c + d v9 = v9 + v13 + vec2(0u, u32(v9.x + v13.x < v9.x)); // b = rotr64(b ^ c, 63) xor = v5 ^ v9; - // v4 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); - v5 = vec2((xor.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -222,14 +220,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v2; - v14 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -264,14 +262,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v3; - v15 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -306,14 +304,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v0; - v15 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -355,7 +353,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 63) xor = v6 ^ v11; - v6 = vec2((xor.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -390,14 +388,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v2; - v13 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -432,7 +430,7 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v3; - v14 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // c = c + d v9 = v9 + v14 + vec2(0u, u32(v9.x + v14.x < v9.x)); @@ -520,14 +518,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v1; - v13 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -562,14 +560,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v2; - v14 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -604,14 +602,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v3; - v15 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -646,14 +644,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v0; - v15 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -695,7 +693,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 63) xor = v6 ^ v11; - v6 = vec2((xor.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -730,14 +728,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v2; - v13 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -772,7 +770,7 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v3; - v14 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // c = c + d v9 = v9 + v14 + vec2(0u, u32(v9.x + v14.x < v9.x)); @@ -860,14 +858,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v1; - v13 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -902,14 +900,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v2; - v14 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -944,14 +942,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v3; - v15 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -986,14 +984,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v0; - v15 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -1035,7 +1033,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 63) xor = v6 ^ v11; - v6 = vec2((xor.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -1070,14 +1068,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v2; - v13 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -1112,7 +1110,7 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v3; - v14 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // c = c + d v9 = v9 + v14 + vec2(0u, u32(v9.x + v14.x < v9.x)); @@ -1200,14 +1198,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v1; - v13 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -1242,14 +1240,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v2; - v14 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -1284,14 +1282,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v3; - v15 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -1326,14 +1324,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v0; - v15 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -1375,7 +1373,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 63) xor = v6 ^ v11; - v6 = vec2((xor.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -1410,14 +1408,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v2; - v13 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -1452,7 +1450,7 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v3; - v14 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // c = c + d v9 = v9 + v14 + vec2(0u, u32(v9.x + v14.x < v9.x)); @@ -1540,14 +1538,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v1; - v13 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -1582,14 +1580,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v2; - v14 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -1624,14 +1622,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v3; - v15 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -1666,14 +1664,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v0; - v15 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -1715,7 +1713,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 63) xor = v6 ^ v11; - v6 = vec2((xor.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -1750,14 +1748,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v2; - v13 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -1792,7 +1790,7 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v3; - v14 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // c = c + d v9 = v9 + v14 + vec2(0u, u32(v9.x + v14.x < v9.x)); @@ -1880,14 +1878,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v1; - v13 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -1922,14 +1920,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v2; - v14 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -1964,14 +1962,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v3; - v15 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -2006,14 +2004,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v0; - v15 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -2055,7 +2053,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 63) xor = v6 ^ v11; - v6 = vec2((xor.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -2090,14 +2088,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v2; - v13 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -2132,7 +2130,7 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v3; - v14 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // c = c + d v9 = v9 + v14 + vec2(0u, u32(v9.x + v14.x < v9.x)); @@ -2220,14 +2218,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v1; - v13 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -2262,14 +2260,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v2; - v14 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -2304,14 +2302,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v3; - v15 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -2346,14 +2344,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v0; - v15 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -2395,7 +2393,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 63) xor = v6 ^ v11; - v6 = vec2((xor.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -2430,14 +2428,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v2; - v13 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -2472,7 +2470,7 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v3; - v14 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // c = c + d v9 = v9 + v14 + vec2(0u, u32(v9.x + v14.x < v9.x)); @@ -2560,14 +2558,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v1; - v13 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -2602,14 +2600,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v2; - v14 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -2644,14 +2642,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v3; - v15 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -2686,14 +2684,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v0; - v15 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -2735,7 +2733,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 63) xor = v6 ^ v11; - v6 = vec2((xor.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -2770,14 +2768,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v2; - v13 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -2812,7 +2810,7 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v3; - v14 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // c = c + d v9 = v9 + v14 + vec2(0u, u32(v9.x + v14.x < v9.x)); @@ -2900,14 +2898,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v1; - v13 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -2942,14 +2940,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v2; - v14 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -2984,14 +2982,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v3; - v15 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -3026,14 +3024,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v0; - v15 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -3075,7 +3073,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 63) xor = v6 ^ v11; - v6 = vec2((xor.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -3110,14 +3108,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v2; - v13 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -3152,7 +3150,7 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v3; - v14 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // c = c + d v9 = v9 + v14 + vec2(0u, u32(v9.x + v14.x < v9.x)); @@ -3240,14 +3238,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v1; - v13 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -3282,14 +3280,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v2; - v14 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -3324,14 +3322,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v3; - v15 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -3366,14 +3364,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v0; - v15 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -3415,7 +3413,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 63) xor = v6 ^ v11; - v6 = vec2((xor.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -3450,14 +3448,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v2; - v13 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -3492,7 +3490,7 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v3; - v14 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // c = c + d v9 = v9 + v14 + vec2(0u, u32(v9.x + v14.x < v9.x)); @@ -3580,14 +3578,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v1; - v13 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -3622,14 +3620,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v2; - v14 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -3664,14 +3662,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v3; - v15 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -3706,14 +3704,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v0; - v15 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -3755,7 +3753,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 63) xor = v6 ^ v11; - v6 = vec2((xor.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -3790,14 +3788,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v2; - v13 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -3832,7 +3830,7 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v3; - v14 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // c = c + d v9 = v9 + v14 + vec2(0u, u32(v9.x + v14.x < v9.x)); @@ -3920,14 +3918,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v1; - v13 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -3962,14 +3960,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v2; - v14 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -4004,14 +4002,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v3; - v15 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -4046,14 +4044,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v15 ^ v0; - v15 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v15 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v5 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -4095,7 +4093,7 @@ fn main(id: vec3) { // b = rotr64(b ^ c, 63) xor = v6 ^ v11; - v6 = vec2((xor.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v6 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -4130,14 +4128,14 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v13 ^ v2; - v13 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v13 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // 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.x << 1u) | (xor.y >> 31u), (xor.y << 1u) | (xor.x >> 31u)); + v7 = vec2((xor.xy << vec2(1u, 1u)) | (xor.yx >> vec2(31u, 31u))); @@ -4172,7 +4170,7 @@ fn main(id: vec3) { // d = rotr64(d ^ a, 16) xor = v14 ^ v3; - v14 = vec2((xor.x >> 16u) | (xor.y << 16u), (xor.y >> 16u) | (xor.x << 16u)); + v14 = vec2((xor.xy >> vec2(16u, 16u)) | (xor.yx << vec2(16u, 16u))); // c = c + d v9 = v9 + v14 + vec2(0u, u32(v9.x + v14.x < v9.x)); -- 2.34.1