Skip to content

InitOptions

InitOptions = object

Defined in: packages/typegpu/src/core/root/init.ts:603

Options passed into init.

optional adapter: GPURequestAdapterOptions

Defined in: packages/typegpu/src/core/root/init.ts:604


optional device: GPUDeviceDescriptor & object

Defined in: packages/typegpu/src/core/root/init.ts:605

optional optionalFeatures: Iterable<GPUFeatureName>


optional unstable_logOptions: LogGeneratorOptions

Defined in: packages/typegpu/src/core/root/init.ts:622


optional unstable_minify: boolean

Defined in: packages/typegpu/src/core/root/init.ts:616

If set to true, rooted resolves will be stripped of all excessive spaces. Rooted resolves include pipelines and all their transitive dependencies, but not, for example, tgpu.resolve([MyStruct]), as there may be multiple roots with different settings in one program.

false

optional unstable_names: "random" | "strict"

Defined in: packages/typegpu/src/core/root/init.ts:607

'strict'

optional unstable_shaderGeneratorClass: WgslGeneratorClass

Defined in: packages/typegpu/src/core/root/init.ts:621

A custom shader code generator, used when resolving TypeGPU functions. If not provided, the default WGSL generator will be used.