From edfdaac74228cc6dd3425c6fc27e323ff704328a Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Tue, 14 Jan 2025 13:25:33 -0800 Subject: [PATCH] Remove last usage of v2 scalar. --- src/shaders/compute.wgsl | 361 +++++++++++++++++++-------------------- 1 file changed, 180 insertions(+), 181 deletions(-) diff --git a/src/shaders/compute.wgsl b/src/shaders/compute.wgsl index c7ef2fb..c747660 100644 --- a/src/shaders/compute.wgsl +++ b/src/shaders/compute.wgsl @@ -76,7 +76,6 @@ fn main(@builtin(global_invocation_id) id: vec3) { - var v2: u32 = 0x84CAA73Bu; var v3: u32 = 0xBB67AE85u; var v4: u32 = 0xFE94F82Bu; var v5: u32 = 0x3C6EF372u; @@ -208,21 +207,21 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1011.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // a = a + m[sigma[r][2*i+0]] - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + vec2(m4, m5) + select(vec2(0u), vec2(0u, 1u), v_23.x + m4 < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // d = rotr64(d ^ a, 32) - v_23.x = v2; + v_23.y = v3; v_2627.x = v26; v_2627.y = v27; @@ -252,25 +251,25 @@ fn main(@builtin(global_invocation_id) id: vec3) { // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1011.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // a = a + m[sigma[r][2*i+1]] - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + vec2(m6, m7) + select(vec2(0u), vec2(0u, 1u), v_23.x + m6 < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // d = rotr64(d ^ a, 16) - v_23.x = v2; + v_23.y = v3; v_2627.x = v26; v_2627.y = v27; @@ -600,12 +599,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1213 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1213.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -614,7 +613,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 32) - v_23.x = v2; + v_23.y = v3; v_2425.x = v24; v_2425.y = v25; @@ -644,12 +643,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1213 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1213.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -658,7 +657,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 16) - v_23.x = v2; + v_23.y = v3; v_2425.x = v24; v_2425.y = v25; @@ -986,25 +985,25 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1011.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // a = a + m[sigma[r][2*i+0]] - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + vec2(m8, m9) + select(vec2(0u), vec2(0u, 1u), v_23.x + m8 < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // d = rotr64(d ^ a, 32) - v_23.x = v2; + v_23.y = v3; v_2627.x = v26; v_2627.y = v27; @@ -1034,12 +1033,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1011.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -1048,7 +1047,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 16) - v_23.x = v2; + v_23.y = v3; v_2627.x = v26; v_2627.y = v27; @@ -1377,25 +1376,25 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1213 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1213.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // a = a + m[sigma[r][2*i+0]] - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + vec2(m0, m1) + select(vec2(0u), vec2(0u, 1u), v_23.x + m0 < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // d = rotr64(d ^ a, 32) - v_23.x = v2; + v_23.y = v3; v_2425.x = v24; v_2425.y = v25; @@ -1425,25 +1424,25 @@ fn main(@builtin(global_invocation_id) id: vec3) { // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1213 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1213.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // a = a + m[sigma[r][2*i+1]] - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + vec2(m4, m5) + select(vec2(0u), vec2(0u, 1u), v_23.x + m4 < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // d = rotr64(d ^ a, 16) - v_23.x = v2; + v_23.y = v3; v_2425.x = v24; v_2425.y = v25; @@ -1776,12 +1775,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1011.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -1790,7 +1789,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 32) - v_23.x = v2; + v_23.y = v3; v_2627.x = v26; v_2627.y = v27; @@ -1820,25 +1819,25 @@ fn main(@builtin(global_invocation_id) id: vec3) { // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1011.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // a = a + m[sigma[r][2*i+1]] - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + vec2(m0, m1) + select(vec2(0u), vec2(0u, 1u), v_23.x + m0 < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // d = rotr64(d ^ a, 16) - v_23.x = v2; + v_23.y = v3; v_2627.x = v26; v_2627.y = v27; @@ -2168,25 +2167,25 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1213 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1213.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // a = a + m[sigma[r][2*i+0]] - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + vec2(m6, m7) + select(vec2(0u), vec2(0u, 1u), v_23.x + m6 < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // d = rotr64(d ^ a, 32) - v_23.x = v2; + v_23.y = v3; v_2425.x = v24; v_2425.y = v25; @@ -2216,12 +2215,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1213 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1213.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -2230,7 +2229,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 16) - v_23.x = v2; + v_23.y = v3; v_2425.x = v24; v_2425.y = v25; @@ -2566,25 +2565,25 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1011.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // a = a + m[sigma[r][2*i+0]] - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + vec2(m6, m7) + select(vec2(0u), vec2(0u, 1u), v_23.x + m6 < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // d = rotr64(d ^ a, 32) - v_23.x = v2; + v_23.y = v3; v_2627.x = v26; v_2627.y = v27; @@ -2614,25 +2613,25 @@ fn main(@builtin(global_invocation_id) id: vec3) { // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1011.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // a = a + m[sigma[r][2*i+1]] - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + vec2(m2, m3) + select(vec2(0u), vec2(0u, 1u), v_23.x + m2 < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // d = rotr64(d ^ a, 16) - v_23.x = v2; + v_23.y = v3; v_2627.x = v26; v_2627.y = v27; @@ -2961,12 +2960,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1213 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1213.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -2975,7 +2974,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 32) - v_23.x = v2; + v_23.y = v3; v_2425.x = v24; v_2425.y = v25; @@ -3005,12 +3004,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1213 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1213.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -3019,7 +3018,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 16) - v_23.x = v2; + v_23.y = v3; v_2425.x = v24; v_2425.y = v25; @@ -3358,12 +3357,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1011.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -3372,7 +3371,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 32) - v_23.x = v2; + v_23.y = v3; v_2627.x = v26; v_2627.y = v27; @@ -3402,12 +3401,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1011.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -3416,7 +3415,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 16) - v_23.x = v2; + v_23.y = v3; v_2627.x = v26; v_2627.y = v27; @@ -3752,12 +3751,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1213 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1213.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -3766,7 +3765,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 32) - v_23.x = v2; + v_23.y = v3; v_2425.x = v24; v_2425.y = v25; @@ -3796,12 +3795,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1213 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1213.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -3810,7 +3809,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 16) - v_23.x = v2; + v_23.y = v3; v_2425.x = v24; v_2425.y = v25; @@ -4144,12 +4143,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1011.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -4158,7 +4157,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 32) - v_23.x = v2; + v_23.y = v3; v_2627.x = v26; v_2627.y = v27; @@ -4188,12 +4187,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1011.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -4202,7 +4201,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 16) - v_23.x = v2; + v_23.y = v3; v_2627.x = v26; v_2627.y = v27; @@ -4539,12 +4538,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1213 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1213.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -4553,7 +4552,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 32) - v_23.x = v2; + v_23.y = v3; v_2425.x = v24; v_2425.y = v25; @@ -4583,12 +4582,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1213 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1213.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -4597,7 +4596,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 16) - v_23.x = v2; + v_23.y = v3; v_2425.x = v24; v_2425.y = v25; @@ -4929,25 +4928,25 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1011.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // a = a + m[sigma[r][2*i+0]] - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + vec2(m2, m3) + select(vec2(0u), vec2(0u, 1u), v_23.x + m2 < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // d = rotr64(d ^ a, 32) - v_23.x = v2; + v_23.y = v3; v_2627.x = v26; v_2627.y = v27; @@ -4977,12 +4976,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1011.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -4991,7 +4990,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 16) - v_23.x = v2; + v_23.y = v3; v_2627.x = v26; v_2627.y = v27; @@ -5323,12 +5322,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1213 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1213.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -5337,7 +5336,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 32) - v_23.x = v2; + v_23.y = v3; v_2425.x = v24; v_2425.y = v25; @@ -5367,25 +5366,25 @@ fn main(@builtin(global_invocation_id) id: vec3) { // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1213 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1213.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // a = a + m[sigma[r][2*i+1]] - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + vec2(m6, m7) + select(vec2(0u), vec2(0u, 1u), v_23.x + m6 < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // d = rotr64(d ^ a, 16) - v_23.x = v2; + v_23.y = v3; v_2425.x = v24; v_2425.y = v25; @@ -5717,12 +5716,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1011.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -5731,7 +5730,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 32) - v_23.x = v2; + v_23.y = v3; v_2627.x = v26; v_2627.y = v27; @@ -5761,12 +5760,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1011.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -5775,7 +5774,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 16) - v_23.x = v2; + v_23.y = v3; v_2627.x = v26; v_2627.y = v27; @@ -6111,12 +6110,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1213 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1213.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -6125,7 +6124,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 32) - v_23.x = v2; + v_23.y = v3; v_2425.x = v24; v_2425.y = v25; @@ -6155,25 +6154,25 @@ fn main(@builtin(global_invocation_id) id: vec3) { // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1213 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1213.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // a = a + m[sigma[r][2*i+1]] - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + vec2(m8, m9) + select(vec2(0u), vec2(0u, 1u), v_23.x + m8 < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // d = rotr64(d ^ a, 16) - v_23.x = v2; + v_23.y = v3; v_2425.x = v24; v_2425.y = v25; @@ -6505,12 +6504,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1011.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -6519,7 +6518,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 32) - v_23.x = v2; + v_23.y = v3; v_2627.x = v26; v_2627.y = v27; @@ -6549,12 +6548,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1011.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -6563,7 +6562,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 16) - v_23.x = v2; + v_23.y = v3; v_2627.x = v26; v_2627.y = v27; @@ -6899,12 +6898,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1213 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1213.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -6913,7 +6912,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 32) - v_23.x = v2; + v_23.y = v3; v_2425.x = v24; v_2425.y = v25; @@ -6943,12 +6942,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1213 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1213.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -6957,7 +6956,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 16) - v_23.x = v2; + v_23.y = v3; v_2425.x = v24; v_2425.y = v25; @@ -7295,12 +7294,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1011.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -7309,7 +7308,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 32) - v_23.x = v2; + v_23.y = v3; v_2627.x = v26; v_2627.y = v27; @@ -7339,25 +7338,25 @@ fn main(@builtin(global_invocation_id) id: vec3) { // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1011.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // a = a + m[sigma[r][2*i+1]] - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + vec2(m8, m9) + select(vec2(0u), vec2(0u, 1u), v_23.x + m8 < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // d = rotr64(d ^ a, 16) - v_23.x = v2; + v_23.y = v3; v_2627.x = v26; v_2627.y = v27; @@ -7687,12 +7686,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1213 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1213.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -7701,7 +7700,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 32) - v_23.x = v2; + v_23.y = v3; v_2425.x = v24; v_2425.y = v25; @@ -7731,12 +7730,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1213 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1213.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -7745,7 +7744,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 16) - v_23.x = v2; + v_23.y = v3; v_2425.x = v24; v_2425.y = v25; @@ -8085,25 +8084,25 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1011.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // a = a + m[sigma[r][2*i+0]] - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + vec2(m4, m5) + select(vec2(0u), vec2(0u, 1u), v_23.x + m4 < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // d = rotr64(d ^ a, 32) - v_23.x = v2; + v_23.y = v3; v_2627.x = v26; v_2627.y = v27; @@ -8133,25 +8132,25 @@ fn main(@builtin(global_invocation_id) id: vec3) { // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1011.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // a = a + m[sigma[r][2*i+1]] - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + vec2(m6, m7) + select(vec2(0u), vec2(0u, 1u), v_23.x + m6 < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // d = rotr64(d ^ a, 16) - v_23.x = v2; + v_23.y = v3; v_2627.x = v26; v_2627.y = v27; @@ -8481,12 +8480,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1213 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1213.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -8495,7 +8494,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 32) - v_23.x = v2; + v_23.y = v3; v_2425.x = v24; v_2425.y = v25; @@ -8525,12 +8524,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1213 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1213.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -8539,7 +8538,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 16) - v_23.x = v2; + v_23.y = v3; v_2425.x = v24; v_2425.y = v25; @@ -8867,25 +8866,25 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1011.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // a = a + m[sigma[r][2*i+0]] - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + vec2(m8, m9) + select(vec2(0u), vec2(0u, 1u), v_23.x + m8 < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // d = rotr64(d ^ a, 32) - v_23.x = v2; + v_23.y = v3; v_2627.x = v26; v_2627.y = v27; @@ -8915,12 +8914,12 @@ fn main(@builtin(global_invocation_id) id: vec3) { // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1011 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1011.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; @@ -8929,7 +8928,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { // skip since adding 0u does nothing // d = rotr64(d ^ a, 16) - v_23.x = v2; + v_23.y = v3; v_2627.x = v26; v_2627.y = v27; @@ -9257,25 +9256,25 @@ fn main(@builtin(global_invocation_id) id: vec3) { */ // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1213 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1213.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // a = a + m[sigma[r][2*i+0]] - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + vec2(m0, m1) + select(vec2(0u), vec2(0u, 1u), v_23.x + m0 < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // d = rotr64(d ^ a, 32) - v_23.x = v2; + v_23.y = v3; v_2425.x = v24; v_2425.y = v25; @@ -9305,25 +9304,25 @@ fn main(@builtin(global_invocation_id) id: vec3) { // a = a + b - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + v_1213 + select(vec2(0u), vec2(0u, 1u), v_23.x + v_1213.x < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // a = a + m[sigma[r][2*i+1]] - v_23.x = v2; + v_23.y = v3; v_23 = v_23 + vec2(m4, m5) + select(vec2(0u), vec2(0u, 1u), v_23.x + m4 < v_23.x); - v2 = v_23.x; + v3 = v_23.y; // d = rotr64(d ^ a, 16) - v_23.x = v2; + v_23.y = v3; v_2425.x = v24; v_2425.y = v25; -- 2.34.1