/**
* Main compute function
+ *
+ * 8-byte work is split into two 4-byte u32
+ * First 4 bytes will be iterated by shader
+ * Last 4 bytes are defined by index of each thread
*/
@compute @workgroup_size(256)
fn main(@builtin(global_invocation_id) global_id: vec3<u32>) {
var m: array<u32, 16>;
- // 8-byte work is split into two 4-byte u32
- // First 6 bytes provided, last 2 bytes defined by this compute index
m[0u] = ubo.rand.x;
m[1u] = (ubo.rand.y << 16u) ^ global_id.x;
- // Block hash
m[2u] = ubo.blockhash[0u].x;
m[3u] = ubo.blockhash[0u].y;
m[4u] = ubo.blockhash[0u].z;