File tree 1 file changed +3
-3
lines changed
src/site/content/en/blog/gpu-compute
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ subhead: |
6
6
authors :
7
7
- beaufortfrancois
8
8
date : 2019-08-28
9
- updated : 2022-08-03
9
+ updated : 2023-01-19
10
10
hero : image/vvhSqZboQoZZN9wBvoXq72wzGAf1/AwjccGqafT2OOWqLGdDX.jpeg
11
11
thumbnail : image/vvhSqZboQoZZN9wBvoXq72wzGAf1/AwjccGqafT2OOWqLGdDX.jpeg
12
12
description : |
@@ -377,7 +377,7 @@ the same index defined in bind group layouts and bind groups declared above.
377
377
const shaderModule = device .createShaderModule ({
378
378
code: `
379
379
struct Matrix {
380
- size : vec2<f32> ,
380
+ size : vec2f ,
381
381
numbers: array<f32>,
382
382
}
383
383
@@ -386,7 +386,7 @@ const shaderModule = device.createShaderModule({
386
386
@group(0) @binding(2) var<storage, read_write> resultMatrix : Matrix;
387
387
388
388
@compute @workgroup_size(8, 8)
389
- fn main(@builtin(global_invocation_id) global_id : vec3<u32> ) {
389
+ fn main(@builtin(global_invocation_id) global_id : vec3u ) {
390
390
// Guard against out-of-bounds work group sizes
391
391
if (global_id.x >= u32(firstMatrix.size.x) || global_id.y >= u32(secondMatrix.size.y)) {
392
392
return;
You can’t perform that action at this time.
0 commit comments