EntryInfo
Interface in Reflection
One @vertex, @fragment or @compute entry point: its stage, its parameter and return types as DSL type keys (the strings typeKey returns), and, for a @compute entry only, its workgroup size, which defaults to 64 when the entry declares none, matching the WGSL backend's own default.
import type { EntryInfo } from 'typeshade'
The signature, the description and the examples come from the compiler's own source at commit 26de7be8.
Syntax
interface EntryInfo { readonly name: string; readonly stage: 'vertex' | 'fragment' | 'compute'; readonly workgroupSize?: number; readonly workgroupShape?: WorkgroupShape; readonly inputs: readonly string[]; readonly output: string; readonly portable?: true; readonly io: EntryIo;}Description
semanticDiff fingerprints a module’s public interface
with this shape: two modules whose entries differ here have a different pipeline contract
even if every other byte of emitted source matches.
Instance properties
nameread onlystringstageread only'vertex' | 'fragment' | 'compute'workgroupSizeoptionalread onlynumberThe
xworkgroup extent of a compute entry. A host sizing a dispatch readsEntryInfo.workgroupShape, which also carriesyandz.workgroupShapeoptionalread onlyWorkgroupShapeThe
[x, y, z]workgroup extents of a compute entry, WGSL’s@workgroup_size(x, y, z)with a missing extent as 1: a dispatch ofninvocations along an axis needsceil(n / extent)workgroups on it.inputsread onlyreadonly string[]outputread onlystringportableoptionalread onlytruePresent, as
true, when the entry is declared a portable kernel; absent otherwise, neverfalse. It tells a host which dispatch shape the kernel needs: on a backend with no compute stage a portable kernel emits as fragment-shader GPGPU and is dispatched as a fullscreen draw into anR32UItarget instead of a compute dispatch. An entry without it runs on WebGPU only.ioread onlyEntryIoThe entry’s location and builtin interface, in structured form.
inputsandoutputare type keys, which is whatsemanticDifffingerprints with;iois the view beside them that a host validating a stage pair reads for the@locationnumbers. Always present. SeeEntryIofor how struct parameters and returns flatten.
See also
Source
src/core/reflect.ts, line 548, at commit 26de7be8