TgpuRoot
Defined in: packages/typegpu/src/core/root/rootTypes.ts:810
Extends
Section titled “Extends”Unwrapper.WithBinding
Properties
Section titled “Properties”[$internal]
Section titled “[$internal]”[$internal]:
object
Defined in: packages/typegpu/src/core/root/rootTypes.ts:811
logOptions
Section titled “logOptions”logOptions:
LogGeneratorOptions
~unstable
Section titled “~unstable”~unstable:
Pick<ExperimentalTgpuRoot,"beginRenderPass"|"beginRenderBundleEncoder"|"createComparisonSampler"|"createGuardedComputePipeline"|"createSampler"|"createTexture"|"flush"|"nameRegistrySetting"|"shaderGenerator"|"pipe"|"with"|"withCompute"|"withVertex">
Defined in: packages/typegpu/src/core/root/rootTypes.ts:1064
device
Section titled “device”
readonlydevice:GPUDevice
Defined in: packages/typegpu/src/core/root/rootTypes.ts:818
The GPU device associated with this root.
Overrides
Section titled “Overrides”Unwrapper.device
Accessors
Section titled “Accessors”enabledFeatures
Section titled “enabledFeatures”Get Signature
Section titled “Get Signature”get enabledFeatures():
ReadonlySet<GPUFeatureName>
Defined in: packages/typegpu/src/core/root/rootTypes.ts:1055
Retrieves a read-only list of all enabled features of the GPU device.
Returns
Section titled “Returns”ReadonlySet<GPUFeatureName>
A set of strings representing the enabled features.
Methods
Section titled “Methods”configureContext()
Section titled “configureContext()”configureContext(
options):GPUCanvasContext
Defined in: packages/typegpu/src/core/root/rootTypes.ts:825
Creates and configures context for the provided canvas.
Automatically sets the format to navigator.gpu.getPreferredCanvasFormat() if not provided.
Parameters
Section titled “Parameters”options
Section titled “options”ConfigureContextOptions
Returns
Section titled “Returns”GPUCanvasContext
Throws
Section titled “Throws”An error if no context could be obtained
createBindGroup()
Section titled “createBindGroup()”createBindGroup<
Entries>(layout,entries):TgpuBindGroup<Entries>
Defined in: packages/typegpu/src/core/root/rootTypes.ts:1044
Creates a group of resources that can be bound to a shader based on a specified layout.
Type Parameters
Section titled “Type Parameters”Entries
Section titled “Entries”Entries extends Record<string, TgpuLayoutEntry | null> = Record<string, TgpuLayoutEntry | null>
Parameters
Section titled “Parameters”layout
Section titled “layout”TgpuBindGroupLayout<Entries>
Layout describing the bind group to be created.
entries
Section titled “entries”ExtractBindGroupInputFromLayout<Entries>
A record with values being the resources populating the bind group and keys being their associated names, matching the layout keys.
Returns
Section titled “Returns”TgpuBindGroup<Entries>
Remarks
Section titled “Remarks”Typed wrapper around a GPUBindGroup.
Example
Section titled “Example”const fooLayout = tgpu.bindGroupLayout({ foo: { uniform: d.vec3f }, bar: { texture: 'float' },});
const fooBuffer = ...;const barTexture = ...;
const fooBindGroup = root.createBindGroup(fooLayout, { foo: fooBuffer, bar: barTexture,});createBuffer()
Section titled “createBuffer()”Call Signature
Section titled “Call Signature”createBuffer<
TData>(typeSchema,initializer):TgpuBuffer<TData>
Defined in: packages/typegpu/src/core/root/rootTypes.ts:836
Allocates memory on the GPU, allows passing data between host and shader.
Type Parameters
Section titled “Type Parameters”TData extends AnyData
Parameters
Section titled “Parameters”typeSchema
Section titled “typeSchema”ValidateBufferSchema<TData>
The type of data that this buffer will hold.
initializer
Section titled “initializer”(buffer) => void
Returns
Section titled “Returns”TgpuBuffer<TData>
Remarks
Section titled “Remarks”Typed wrapper around a GPUBuffer.
Call Signature
Section titled “Call Signature”createBuffer<
TData>(typeSchema,initial?):TgpuBuffer<TData>
Defined in: packages/typegpu/src/core/root/rootTypes.ts:841
Type Parameters
Section titled “Type Parameters”TData extends AnyData
Parameters
Section titled “Parameters”typeSchema
Section titled “typeSchema”ValidateBufferSchema<TData>
initial?
Section titled “initial?”InferInput<NoInfer>
Returns
Section titled “Returns”TgpuBuffer<TData>
Call Signature
Section titled “Call Signature”createBuffer<
TData>(typeSchema,initial?):TgpuBuffer<TData>
Defined in: packages/typegpu/src/core/root/rootTypes.ts:846
Type Parameters
Section titled “Type Parameters”TData extends AnyData
Parameters
Section titled “Parameters”typeSchema
Section titled “typeSchema”ValidateBufferSchema<TData>
initial?
Section titled “initial?”InferInput<NoInfer> | (buffer) => void
Returns
Section titled “Returns”TgpuBuffer<TData>
Call Signature
Section titled “Call Signature”createBuffer<
TData>(typeSchema,gpuBuffer):TgpuBuffer<TData>
Defined in: packages/typegpu/src/core/root/rootTypes.ts:861
Allocates memory on the GPU, allows passing data between host and shader.
Type Parameters
Section titled “Type Parameters”TData extends AnyData
Parameters
Section titled “Parameters”typeSchema
Section titled “typeSchema”ValidateBufferSchema<TData>
The type of data that this buffer will hold.
gpuBuffer
Section titled “gpuBuffer”GPUBuffer
A vanilla WebGPU buffer.
Returns
Section titled “Returns”TgpuBuffer<TData>
Remarks
Section titled “Remarks”Typed wrapper around a GPUBuffer.
createComparisonSampler()
Section titled “createComparisonSampler()”createComparisonSampler(
props):TgpuFixedComparisonSampler
Defined in: packages/typegpu/src/core/root/rootTypes.ts:1002
Parameters
Section titled “Parameters”WgslComparisonSamplerProps
Returns
Section titled “Returns”createComputePipeline()
Section titled “createComputePipeline()”createComputePipeline<
ComputeIn>(descriptor):TgpuComputePipeline
Defined in: packages/typegpu/src/core/root/rootTypes.ts:260
Type Parameters
Section titled “Type Parameters”ComputeIn
Section titled “ComputeIn”ComputeIn extends IORecord<AnyComputeBuiltin>
Parameters
Section titled “Parameters”descriptor
Section titled “descriptor”Descriptor<ComputeIn>
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”WithBinding.createComputePipeline
createGuardedComputePipeline()
Section titled “createGuardedComputePipeline()”createGuardedComputePipeline<
TArgs>(callback):TgpuGuardedComputePipeline<TArgs>
Defined in: packages/typegpu/src/core/root/rootTypes.ts:424
Creates a compute pipeline that executes the given callback in an exact number of threads.
This is different from withCompute(...).createPipeline() in that it does a bounds check on the
thread id, where as regular pipelines do not and work in units of workgroups.
Type Parameters
Section titled “Type Parameters”TArgs extends number[]
Parameters
Section titled “Parameters”callback
Section titled “callback”(…args) => void
A function converted to WGSL and executed on the GPU. It can accept up to 3 parameters (x, y, z) which correspond to the global invocation ID of the executing thread.
Returns
Section titled “Returns”TgpuGuardedComputePipeline<TArgs>
Examples
Section titled “Examples”If no parameters are provided, the callback will be executed once, in a single thread.
const fooPipeline = root .createGuardedComputePipeline(() => { 'use gpu'; console.log('Hello, GPU!'); });
fooPipeline.dispatchThreads();// [GPU] Hello, GPU!One parameter means n-threads will be executed in parallel.
const fooPipeline = root .createGuardedComputePipeline((x) => { 'use gpu'; if (x % 16 === 0) { // Logging every 16th thread console.log('I am the', x, 'thread'); } });
// executing 512 threadsfooPipeline.dispatchThreads(512);// [GPU] I am the 256 thread// [GPU] I am the 272 thread// ... (30 hidden logs)// [GPU] I am the 16 thread// [GPU] I am the 240 threadInherited from
Section titled “Inherited from”WithBinding.createGuardedComputePipeline
createMutable()
Section titled “createMutable()”Call Signature
Section titled “Call Signature”createMutable<
TData>(typeSchema,initializer):TgpuMutable<TData>
Defined in: packages/typegpu/src/core/root/rootTypes.ts:910
Allocates memory on the GPU, allows passing data between host and shader. Can be mutated in-place on the GPU. For a general-purpose buffer, use TgpuRoot.createBuffer.
Type Parameters
Section titled “Type Parameters”TData extends AnyWgslData
Parameters
Section titled “Parameters”typeSchema
Section titled “typeSchema”ValidateStorageSchema<TData>
The type of data that this buffer will hold.
initializer
Section titled “initializer”(buffer) => void
Returns
Section titled “Returns”TgpuMutable<TData>
Call Signature
Section titled “Call Signature”createMutable<
TData>(typeSchema,initial?):TgpuMutable<TData>
Defined in: packages/typegpu/src/core/root/rootTypes.ts:914
Type Parameters
Section titled “Type Parameters”TData extends AnyWgslData
Parameters
Section titled “Parameters”typeSchema
Section titled “typeSchema”ValidateStorageSchema<TData>
initial?
Section titled “initial?”InferInput<NoInfer>
Returns
Section titled “Returns”TgpuMutable<TData>
Call Signature
Section titled “Call Signature”createMutable<
TData>(typeSchema,initial?):TgpuMutable<TData>
Defined in: packages/typegpu/src/core/root/rootTypes.ts:919
Type Parameters
Section titled “Type Parameters”TData extends AnyWgslData
Parameters
Section titled “Parameters”typeSchema
Section titled “typeSchema”ValidateStorageSchema<TData>
initial?
Section titled “initial?”InferInput<NoInfer> | (buffer) => void
Returns
Section titled “Returns”TgpuMutable<TData>
Call Signature
Section titled “Call Signature”createMutable<
TData>(typeSchema,gpuBuffer):TgpuMutable<TData>
Defined in: packages/typegpu/src/core/root/rootTypes.ts:933
Allocates memory on the GPU, allows passing data between host and shader. Can be mutated in-place on the GPU. For a general-purpose buffer, use TgpuRoot.createBuffer.
Type Parameters
Section titled “Type Parameters”TData extends AnyWgslData
Parameters
Section titled “Parameters”typeSchema
Section titled “typeSchema”ValidateStorageSchema<TData>
The type of data that this buffer will hold.
gpuBuffer
Section titled “gpuBuffer”GPUBuffer
A vanilla WebGPU buffer.
Returns
Section titled “Returns”TgpuMutable<TData>
createQuerySet()
Section titled “createQuerySet()”createQuerySet<
T>(type,count,rawQuerySet?):TgpuQuerySet<T>
Defined in: packages/typegpu/src/core/root/rootTypes.ts:1014
Creates a query set for collecting timestamps or occlusion queries.
Type Parameters
Section titled “Type Parameters”T extends GPUQueryType
Parameters
Section titled “Parameters”T
The type of queries to collect (‘occlusion’ or ‘timestamp’).
number
The number of queries in the set.
rawQuerySet?
Section titled “rawQuerySet?”GPUQuerySet
An optional pre-existing GPUQuerySet to use instead of creating a new one.
Returns
Section titled “Returns”TgpuQuerySet<T>
Remarks
Section titled “Remarks”Typed wrapper around a GPUQuerySet.
createReadonly()
Section titled “createReadonly()”Call Signature
Section titled “Call Signature”createReadonly<
TData>(typeSchema,initializer):TgpuReadonly<TData>
Defined in: packages/typegpu/src/core/root/rootTypes.ts:946
Allocates memory on the GPU, allows passing data between host and shader. Read-only on the GPU, optimized for large data. For a general-purpose buffer, use TgpuRoot.createBuffer.
Type Parameters
Section titled “Type Parameters”TData extends AnyWgslData
Parameters
Section titled “Parameters”typeSchema
Section titled “typeSchema”ValidateStorageSchema<TData>
The type of data that this buffer will hold.
initializer
Section titled “initializer”(buffer) => void
Returns
Section titled “Returns”TgpuReadonly<TData>
Call Signature
Section titled “Call Signature”createReadonly<
TData>(typeSchema,initial?):TgpuReadonly<TData>
Defined in: packages/typegpu/src/core/root/rootTypes.ts:950
Type Parameters
Section titled “Type Parameters”TData extends AnyWgslData
Parameters
Section titled “Parameters”typeSchema
Section titled “typeSchema”ValidateStorageSchema<TData>
initial?
Section titled “initial?”InferInput<NoInfer>
Returns
Section titled “Returns”TgpuReadonly<TData>
Call Signature
Section titled “Call Signature”createReadonly<
TData>(typeSchema,initial?):TgpuReadonly<TData>
Defined in: packages/typegpu/src/core/root/rootTypes.ts:955
Type Parameters
Section titled “Type Parameters”TData extends AnyWgslData
Parameters
Section titled “Parameters”typeSchema
Section titled “typeSchema”ValidateStorageSchema<TData>
initial?
Section titled “initial?”InferInput<NoInfer> | (buffer) => void
Returns
Section titled “Returns”TgpuReadonly<TData>
Call Signature
Section titled “Call Signature”createReadonly<
TData>(typeSchema,gpuBuffer):TgpuReadonly<TData>
Defined in: packages/typegpu/src/core/root/rootTypes.ts:969
Allocates memory on the GPU, allows passing data between host and shader. Read-only on the GPU, optimized for large data. For a general-purpose buffer, use TgpuRoot.createBuffer.
Type Parameters
Section titled “Type Parameters”TData extends AnyWgslData
Parameters
Section titled “Parameters”typeSchema
Section titled “typeSchema”ValidateStorageSchema<TData>
The type of data that this buffer will hold.
gpuBuffer
Section titled “gpuBuffer”GPUBuffer
A vanilla WebGPU buffer.
Returns
Section titled “Returns”TgpuReadonly<TData>
createRenderPipeline()
Section titled “createRenderPipeline()”Call Signature
Section titled “Call Signature”createRenderPipeline<
TVertexIn,TAttribs,TVertexOut,TFragmentOut>(descriptor):TgpuRenderPipeline<NormalizeOutput<TFragmentOut>>
Defined in: packages/typegpu/src/core/root/rootTypes.ts:264
Type Parameters
Section titled “Type Parameters”TVertexIn
Section titled “TVertexIn”TVertexIn extends In = Record<string, any>
TAttribs
Section titled “TAttribs”TAttribs extends object = LayoutToAllowedAttribs<TVertexIn>
TVertexOut
Section titled “TVertexOut”TVertexOut = unknown
TFragmentOut
Section titled “TFragmentOut”TFragmentOut = unknown
Parameters
Section titled “Parameters”descriptor
Section titled “descriptor”DescriptorBase & object
Returns
Section titled “Returns”TgpuRenderPipeline<NormalizeOutput<TFragmentOut>>
Inherited from
Section titled “Inherited from”WithBinding.createRenderPipeline
Call Signature
Section titled “Call Signature”createRenderPipeline<
TVertexIn,TAttribs,TVertexOut>(descriptor):TgpuRenderPipeline<Void>
Defined in: packages/typegpu/src/core/root/rootTypes.ts:293
Type Parameters
Section titled “Type Parameters”TVertexIn
Section titled “TVertexIn”TVertexIn extends In = Record<string, any>
TAttribs
Section titled “TAttribs”TAttribs extends object = LayoutToAllowedAttribs<TVertexIn>
TVertexOut
Section titled “TVertexOut”Parameters
Section titled “Parameters”descriptor
Section titled “descriptor”DescriptorBase & object
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”WithBinding.createRenderPipeline
Call Signature
Section titled “Call Signature”createRenderPipeline<
TVertexIn,TAttribs,TVertexOut,TFragmentOut>(descriptor):TgpuRenderPipeline<Void> |TgpuRenderPipeline<NormalizeOutput<TFragmentOut>>
Defined in: packages/typegpu/src/core/root/rootTypes.ts:322
Type Parameters
Section titled “Type Parameters”TVertexIn
Section titled “TVertexIn”TVertexIn extends In = Record<string, any>
TAttribs
Section titled “TAttribs”TAttribs extends object = LayoutToAllowedAttribs<TVertexIn>
TVertexOut
Section titled “TVertexOut”TFragmentOut
Section titled “TFragmentOut”TFragmentOut = unknown
Parameters
Section titled “Parameters”descriptor
Section titled “descriptor”DescriptorBase & { attribs?: TAttribs; fragment: TgpuFragmentFn<VertexOutToVarying<OmitBuiltins<TVertexOut>> & Record<string, AnyFragmentInputBuiltin>, Assume<TFragmentOut, Out>> | (input) => AutoFragmentOut<Assume<TFragmentOut, v4f | AnyAutoCustoms>>; targets?: FragmentOutToTargets<NoInfer>; vertex: TgpuVertexFn<TVertexIn, Assume<TVertexOut, Out>> | (input) => AutoVertexOut<Assume<TVertexOut, AnyAutoCustoms>>; } | { attribs?: TAttribs; fragment?: TgpuFragmentFn<VertexOutToVarying<OmitBuiltins<TVertexOut>> & Record<string, AnyFragmentInputBuiltin>, Record<string, never>> | (input) => undefined; targets?: undefined; vertex: TgpuVertexFn<TVertexIn, Assume<TVertexOut, Out>> | (input) => AutoVertexOut<Assume<TVertexOut, AnyAutoCustoms>>; }
Returns
Section titled “Returns”TgpuRenderPipeline<Void> | TgpuRenderPipeline<NormalizeOutput<TFragmentOut>>
Inherited from
Section titled “Inherited from”WithBinding.createRenderPipeline
createSampler()
Section titled “createSampler()”createSampler(
props):TgpuFixedSampler
Defined in: packages/typegpu/src/core/root/rootTypes.ts:1000
Parameters
Section titled “Parameters”WgslSamplerProps
Returns
Section titled “Returns”createTexture()
Section titled “createTexture()”createTexture<
TWidth,THeight,TDepth,TSize,TFormat,TMipLevelCount,TSampleCount,TViewFormats,TDimension>(props):TgpuTexture<{ [K in “size” | “dimension” | “format” | “mipLevelCount” | “sampleCount” | “viewFormats”]: ({ format: TFormat; size: Mutable<TSize> } & OmitProps<{ dimension: GPUTextureDimension extends TDimension ? undefined : TDimension extends “2d” ? undefined : TDimension; mipLevelCount: number extends TMipLevelCount ? undefined : TMipLevelCount extends 1 ? undefined : TMipLevelCount; sampleCount: number extends TSampleCount ? undefined : TSampleCount extends 1 ? undefined : TSampleCount; viewFormats: GPUTextureFormat[] extends TViewFormats ? undefined : TViewFormats extends never[] ? undefined : TViewFormats extends SrgbVariantOrSelf<TFormat> ? TViewFormats : never }, undefined>)[K] }>
Defined in: packages/typegpu/src/core/root/rootTypes.ts:974
Type Parameters
Section titled “Type Parameters”TWidth
Section titled “TWidth”TWidth extends number
THeight
Section titled “THeight”THeight extends number
TDepth
Section titled “TDepth”TDepth extends number
TSize extends readonly [TWidth] | readonly [TWidth, THeight] | readonly [TWidth, THeight, TDepth]
TFormat
Section titled “TFormat”TFormat extends GPUTextureFormat
TMipLevelCount
Section titled “TMipLevelCount”TMipLevelCount extends number
TSampleCount
Section titled “TSampleCount”TSampleCount extends number
TViewFormats
Section titled “TViewFormats”TViewFormats extends GPUTextureFormat[]
TDimension
Section titled “TDimension”TDimension extends GPUTextureDimension
Parameters
Section titled “Parameters”CreateTextureOptions<TSize, TFormat, TMipLevelCount, TSampleCount, TViewFormats, TDimension>
Returns
Section titled “Returns”TgpuTexture<{ [K in “size” | “dimension” | “format” | “mipLevelCount” | “sampleCount” | “viewFormats”]: ({ format: TFormat; size: Mutable<TSize> } & OmitProps<{ dimension: GPUTextureDimension extends TDimension ? undefined : TDimension extends “2d” ? undefined : TDimension; mipLevelCount: number extends TMipLevelCount ? undefined : TMipLevelCount extends 1 ? undefined : TMipLevelCount; sampleCount: number extends TSampleCount ? undefined : TSampleCount extends 1 ? undefined : TSampleCount; viewFormats: GPUTextureFormat[] extends TViewFormats ? undefined : TViewFormats extends never[] ? undefined : TViewFormats extends SrgbVariantOrSelf<TFormat> ? TViewFormats : never }, undefined>)[K] }>
createUniform()
Section titled “createUniform()”Call Signature
Section titled “Call Signature”createUniform<
TData>(typeSchema,initializer):TgpuUniform<TData>
Defined in: packages/typegpu/src/core/root/rootTypes.ts:874
Allocates memory on the GPU, allows passing data between host and shader. Read-only on the GPU, optimized for small data. For a general-purpose buffer, use TgpuRoot.createBuffer.
Type Parameters
Section titled “Type Parameters”TData extends AnyWgslData
Parameters
Section titled “Parameters”typeSchema
Section titled “typeSchema”ValidateUniformSchema<TData>
The type of data that this buffer will hold.
initializer
Section titled “initializer”(buffer) => void
Returns
Section titled “Returns”TgpuUniform<TData>
Call Signature
Section titled “Call Signature”createUniform<
TData>(typeSchema,initial?):TgpuUniform<TData>
Defined in: packages/typegpu/src/core/root/rootTypes.ts:878
Type Parameters
Section titled “Type Parameters”TData extends AnyWgslData
Parameters
Section titled “Parameters”typeSchema
Section titled “typeSchema”ValidateUniformSchema<TData>
initial?
Section titled “initial?”InferInput<NoInfer>
Returns
Section titled “Returns”TgpuUniform<TData>
Call Signature
Section titled “Call Signature”createUniform<
TData>(typeSchema,initial?):TgpuUniform<TData>
Defined in: packages/typegpu/src/core/root/rootTypes.ts:883
Type Parameters
Section titled “Type Parameters”TData extends AnyWgslData
Parameters
Section titled “Parameters”typeSchema
Section titled “typeSchema”ValidateUniformSchema<TData>
initial?
Section titled “initial?”InferInput<NoInfer> | (buffer) => void
Returns
Section titled “Returns”TgpuUniform<TData>
Call Signature
Section titled “Call Signature”createUniform<
TData>(typeSchema,gpuBuffer):TgpuUniform<TData>
Defined in: packages/typegpu/src/core/root/rootTypes.ts:897
Allocates memory on the GPU, allows passing data between host and shader. Read-only on the GPU, optimized for small data. For a general-purpose buffer, use TgpuRoot.createBuffer.
Type Parameters
Section titled “Type Parameters”TData extends AnyWgslData
Parameters
Section titled “Parameters”typeSchema
Section titled “typeSchema”ValidateUniformSchema<TData>
The type of data that this buffer will hold.
gpuBuffer
Section titled “gpuBuffer”GPUBuffer
A vanilla WebGPU buffer.
Returns
Section titled “Returns”TgpuUniform<TData>
destroy()
Section titled “destroy()”destroy():
void
Defined in: packages/typegpu/src/core/root/rootTypes.ts:1062
Destroys all underlying resources (i.e. buffers…) created through this root object.
If the object is created via tgpu.init instead of tgpu.initFromDevice,
then the inner GPU device is destroyed as well.
Returns
Section titled “Returns”void
pipe()
Section titled “pipe()”pipe(
transform):WithBinding
Defined in: packages/typegpu/src/core/root/rootTypes.ts:436
Parameters
Section titled “Parameters”transform
Section titled “transform”(cfg) => Configurable
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”unwrap()
Section titled “unwrap()”Call Signature
Section titled “Call Signature”unwrap(
resource):GPUComputePipeline
Defined in: packages/typegpu/src/unwrapper.ts:13
Parameters
Section titled “Parameters”resource
Section titled “resource”Returns
Section titled “Returns”GPUComputePipeline
Inherited from
Section titled “Inherited from”Unwrapper.unwrap
Call Signature
Section titled “Call Signature”unwrap(
resource):GPURenderPipeline
Defined in: packages/typegpu/src/unwrapper.ts:14
Parameters
Section titled “Parameters”resource
Section titled “resource”Returns
Section titled “Returns”GPURenderPipeline
Inherited from
Section titled “Inherited from”Unwrapper.unwrap
Call Signature
Section titled “Call Signature”unwrap(
resource):GPUBindGroupLayout
Defined in: packages/typegpu/src/unwrapper.ts:15
Parameters
Section titled “Parameters”resource
Section titled “resource”Returns
Section titled “Returns”GPUBindGroupLayout
Inherited from
Section titled “Inherited from”Unwrapper.unwrap
Call Signature
Section titled “Call Signature”unwrap(
resource):GPUBindGroup
Defined in: packages/typegpu/src/unwrapper.ts:16
Parameters
Section titled “Parameters”resource
Section titled “resource”Returns
Section titled “Returns”GPUBindGroup
Inherited from
Section titled “Inherited from”Unwrapper.unwrap
Call Signature
Section titled “Call Signature”unwrap(
resource):GPUBuffer
Defined in: packages/typegpu/src/unwrapper.ts:17
Parameters
Section titled “Parameters”resource
Section titled “resource”Returns
Section titled “Returns”GPUBuffer
Inherited from
Section titled “Inherited from”Unwrapper.unwrap
Call Signature
Section titled “Call Signature”unwrap(
resource):GPUTextureView
Defined in: packages/typegpu/src/unwrapper.ts:18
Parameters
Section titled “Parameters”resource
Section titled “resource”Returns
Section titled “Returns”GPUTextureView
Inherited from
Section titled “Inherited from”Unwrapper.unwrap
Call Signature
Section titled “Call Signature”unwrap(
resource):GPUVertexBufferLayout
Defined in: packages/typegpu/src/unwrapper.ts:19
Parameters
Section titled “Parameters”resource
Section titled “resource”Returns
Section titled “Returns”GPUVertexBufferLayout
Inherited from
Section titled “Inherited from”Unwrapper.unwrap
Call Signature
Section titled “Call Signature”unwrap(
resource):GPUSampler
Defined in: packages/typegpu/src/unwrapper.ts:20
Parameters
Section titled “Parameters”resource
Section titled “resource”Returns
Section titled “Returns”GPUSampler
Inherited from
Section titled “Inherited from”Unwrapper.unwrap
Call Signature
Section titled “Call Signature”unwrap(
resource):GPUSampler
Defined in: packages/typegpu/src/unwrapper.ts:21
Parameters
Section titled “Parameters”resource
Section titled “resource”Returns
Section titled “Returns”GPUSampler
Inherited from
Section titled “Inherited from”Unwrapper.unwrap
Call Signature
Section titled “Call Signature”unwrap(
resource):GPUQuerySet
Defined in: packages/typegpu/src/unwrapper.ts:22
Parameters
Section titled “Parameters”resource
Section titled “resource”TgpuQuerySet<GPUQueryType>
Returns
Section titled “Returns”GPUQuerySet
Inherited from
Section titled “Inherited from”Unwrapper.unwrap
Call Signature
Section titled “Call Signature”unwrap(
resource):GPUTexture
Defined in: packages/typegpu/src/unwrapper.ts:23
Parameters
Section titled “Parameters”resource
Section titled “resource”Returns
Section titled “Returns”GPUTexture
Inherited from
Section titled “Inherited from”Unwrapper.unwrap
with()
Section titled “with()”Call Signature
Section titled “Call Signature”with<
T>(slot,value):WithBinding
Defined in: packages/typegpu/src/core/root/rootTypes.ts:204
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”TgpuSlot<T>
Eventual<T>
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”with<
T>(accessor,value):WithBinding
Defined in: packages/typegpu/src/core/root/rootTypes.ts:205
Type Parameters
Section titled “Type Parameters”T extends BaseData
Parameters
Section titled “Parameters”accessor
Section titled “accessor”TgpuAccessor<T>
In<NoInfer>
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”with<
T>(accessor,value):WithBinding
Defined in: packages/typegpu/src/core/root/rootTypes.ts:206
Type Parameters
Section titled “Type Parameters”T extends BaseData
Parameters
Section titled “Parameters”accessor
Section titled “accessor”In<NoInfer>
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”withCompute()
Section titled “withCompute()”withCompute<
ComputeIn>(entryFn):WithCompute
Defined in: packages/typegpu/src/core/root/rootTypes.ts:256
Type Parameters
Section titled “Type Parameters”ComputeIn
Section titled “ComputeIn”ComputeIn extends IORecord<AnyComputeBuiltin>
Parameters
Section titled “Parameters”entryFn
Section titled “entryFn”TgpuComputeFn<ComputeIn>
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”withVertex()
Section titled “withVertex()”withVertex<
VertexIn,VertexOut>(entryFn, …args):WithVertex<VertexOut>
Defined in: packages/typegpu/src/core/root/rootTypes.ts:431
Type Parameters
Section titled “Type Parameters”VertexIn
Section titled “VertexIn”VertexIn extends In
VertexOut
Section titled “VertexOut”VertexOut extends Out
Parameters
Section titled “Parameters”entryFn
Section titled “entryFn”TgpuVertexFn<VertexIn, VertexOut>
…OptionalArgs<LayoutToAllowedAttribs<OmitBuiltins<VertexIn>>>
Returns
Section titled “Returns”WithVertex<VertexOut>