Skip to content

Commit 97015e6

Browse files
committed
Support immediates in the WGSL Offset Computer
1 parent 0c1094e commit 97015e6

2 files changed

Lines changed: 29 additions & 38 deletions

File tree

3rdparty/webgpu-utils-2.x.module.js

Lines changed: 24 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webgpu/lessons/resources/wgsl-offset-computer.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ <h1>WGSL Offset Computer</h1>
311311
import {
312312
makeShaderDataDefinitions,
313313
setIntrinsicsToView,
314-
} from '/3rdparty/webgpu-utils-1.x.module.js';
314+
} from '/3rdparty/webgpu-utils-2.x.module.js';
315315
import {
316316
createByteDiagramForType,
317317
getCodeForUniform,
@@ -443,6 +443,10 @@ <h1>WGSL Offset Computer</h1>
443443
label: 'struct',
444444
toTypeDef: v => v,
445445
},
446+
immediates: {
447+
label: 'immediate',
448+
toTypeDef: v => v.typeDefinition,
449+
},
446450
uniforms: {
447451
label: 'uniform',
448452
toTypeDef: v => v.typeDefinition,

0 commit comments

Comments
 (0)