---
title: "ComputePipeline: TypeShade 셰이더 API의 런타임 분류 인터페이스 참조 문서"
description: "ComputePipeline, TypeShade API의 런타임 분류에 속하는 인터페이스입니다. 컴퓨트 파이프라인입니다. 진입점은 하나이며, 디스패치할 때 바인딩을 이름으로 지정합니다."
url: https://typeshade.dev/ko/api/computepipeline/
language: ko
---

# `ComputePipeline`

인터페이스, 런타임 분류

컴퓨트 파이프라인입니다. 진입점은 하나이며, 디스패치할 때 바인딩을 이름으로 지정합니다.

`import type { ComputePipeline } from 'typeshade/runtime'`

설명은 커밋 af54ddad5의 검토된 컴파일러 문서를 번역한 것입니다. 시그니처와 예제 코드는 원문을 따르며, 필요한 경우 설명에 편집상 수정이 반영됩니다.

## 구문

```ts
interface ComputePipeline<B = Bindings> {
  readonly entry: string;
  readonly workgroupShape: readonly [number, number, number];
  dispatch(target: object, bindings: B, workgroups: number | readonly number[]): void;
}
```

## 설명

`B`는 진입점이 닿는 바인딩입니다(변경 0030). `workgroupShape`는 이 파이프라인을 만들 때 쓴 상수(워크그룹 크기 오버라이드 포함)에 따라 확정된 `[x, y, z]` 형태입니다.

## 인스턴스 속성

**`entry` 읽기 전용 `string`**

**`workgroupShape` 읽기 전용 `readonly [number, number, number]`**

이 파이프라인을 만들 때 적용한 확정된 `[x, y, z]` 워크그룹 크기입니다.

## 인스턴스 메서드

**`dispatch` `(target: object, bindings: B, workgroups: number | readonly number[]): void`**

호스트의 인코더나 컴퓨트 패스, 또는 프레임의 인코더에 디스패치를 기록합니다. 탈출구([Rule 11.17](https://typeshade.dev/ko/reference/rules/11-17/))입니다. 호스트의 `GPUCommandEncoder` 또는 `GPUComputePassEncoder`에 디스패치가 기록됩니다. WebGL2는 프레임만 받습니다.

## 소스

[`src/runtime/program.ts`, 428행](https://github.com/typeshade/typeshade/blob/af54ddad5/src/runtime/program.ts#L428), 커밋 af54ddad5 기준
