Frame
이 페이지에서

Frame

인터페이스, 런타임 분류

One command encoder's work: dispatches and render passes, submitted together.

import type { Frame } from 'typeshade/runtime'

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

구문

interface Frame {
readonly encoder: object;
dispatch( pipeline: ComputePipeline, bindings: Bindings, workgroups: number | readonly number[], ): void;
pass(targets: PassTargets, record: (pass: RenderPass) => void): void;
submit(): Promise<{ readonly console: readonly { readonly entry: string; readonly lines: number; readonly dropped: number; }[]; }>;
}

인스턴스 속성

encoder읽기 전용 object

The GPUCommandEncoder, for the host’s own commands between the frame’s.

인스턴스 메서드

dispatch (pipeline: ComputePipeline, bindings: Bindings, workgroups: number | readonly number[]): void
pass (targets: PassTargets, record: (pass: RenderPass) => void): void
submit (): Promise<{ readonly console: readonly { readonly entry: string; readonly lines: number; readonly dropped: number; }[]; }>

Submit the frame. The queue is given its commands before submit() returns its promise, so a texture read started right after it, while the promise is pending, reads the frame (Texture.read). It resolves once the queue has run the frame and the console lines of its entries are delivered, printed or handed to the runtime’s sink, to what their buffers held: { console: [{ entry, lines, dropped }, …] }, a row for each dispatch and draw of the frame that recorded, in the order they were recorded, and none when nothing did. entry names what the buffer recorded for (the compute entry, or the fragment entry of a draw), lines the console.* calls it kept, each printed or handed to the sink, and dropped the calls that had no room in consoleBytes. A runtime that prints warns of the dropped calls; one given a sink prints nothing, so its host reads the count here. It rejects with the validation error the frame raised, if any.

소스

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

이 페이지 편집 문제 보고