Runtime
이 페이지에서

Runtime

인터페이스, 런타임 분류

The program runtime: a device, and everything a program needs on it.

import type { Runtime } from 'typeshade/runtime'

시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.

구문

interface Runtime<D extends object = object> {
readonly device: D;
load(program: Pack, options?: LoadOptions): Program;
texture(options: TextureOptions | object): Texture;
sampler(options?: SamplerOptions | object): Sampler;
frame(): Frame;
submit(...encoders: readonly object[]): ReturnType<Frame['submit']>;
destroy(): void;
}

인스턴스 속성

device읽기 전용 D

The GPUDevice: the host’s, or the one the runtime requested.

인스턴스 메서드

load (program: Pack, options?: LoadOptions): Program
texture (options: TextureOptions | object): Texture
sampler (options?: SamplerOptions | object): Sampler
frame (): Frame
submit (...encoders: readonly object[]): ReturnType<Frame['submit']>

Submit the host’s own encoders, after copying back the console buffers of the dispatches and draws recorded since the last submit; resolves once the lines are delivered, to what those buffers held, as Frame.submit() does: the queue is given the encoders before the promise is returned.

destroy (): void

Release what the runtime made. The host’s device is left as it is.

소스

src/runtime/runtime.ts, 132행, 커밋 c66579bf 기준

이 페이지 편집 문제 보고