PackBinding
On this page

PackBinding

Interface in Reflection

One resource slot. name, space, group, binding, access and type are the fields packModule() has always given; the rest came with schema 1.

import type { PackBinding } from 'typeshade'

The signature, the description and the examples come from the compiler's own source at commit af54ddad5.

Syntax

interface PackBinding {
readonly name: string;
readonly emitted: string;
readonly emittedGlsl: string;
readonly space: string;
readonly group: number;
readonly binding: number;
readonly access?: 'read' | 'read_write';
readonly type: string;
readonly resource: PackResource;
readonly stages: readonly ('vertex' | 'fragment' | 'compute')[];
readonly layout?: PackLayout;
readonly rule?: 'std140' | 'std430';
readonly noLayout?: string;
readonly injected?: true;
readonly dataTexture?: PackDataTexture;
}

Instance properties

nameread only string

The authored name the host binds by.

emittedread only string

The name the emitted text declares it under (Rule 11.10).

emittedGlslread only string

The GLSL spelling, always present; equal to emitted where the targets agree.

spaceread only string
groupread only number
bindingread only number
accessoptionalread only 'read' | 'read_write'
typeread only string

The typeKey spelling: vec4<f32>, array<f32>, texture_2d<f32>.

resourceread only PackResource
stagesread only readonly ('vertex' | 'fragment' | 'compute')[]

The stages whose entries reach it, which its bind group layout’s visibility names.

layoutoptionalread only PackLayout

A buffer’s byte layout, under rule; absent on a handle.

ruleoptionalread only 'std140' | 'std430'
noLayoutoptionalread only string

Why a buffer has no host layout: a bool, a two-row matrix in a uniform.

injectedoptionalread only true

A binding the emit adds, which the host binds as it binds any other: the _fp64 guard, a 1 × 1 texture that holds 1.0, and the recorded variant’s _console buffer.

dataTextureoptionalread only PackDataTexture

A storage array’s data texture on WebGL2, when the GLSL ES 3.00 program reads it as one.

Source

src/core/manifest-types.ts, line 176, at commit af54ddad5

Edit this page Report a problem