# GpuPipelineBinding

`import { GpuPipelineBinding } from "destack:gpu/binding";`

Pipeline binding family.

```ds title="GpuPipelineBinding"
export interface GpuPipelineBinding {
    createShader(device: GpuDeviceHandle, descriptor: &'a readonly GpuShaderDescriptor, bytes: &'b readonly [uint8]): Result<GpuShaderHandle, HostError>;
    destroyShader(shader: GpuShaderHandle): Result<void, HostError>;
    readShaderCompilation(shader: GpuShaderHandle, timeoutNs: uint64): Result<GpuCompilationInfo, HostError>;
    createComputePipeline(device: GpuDeviceHandle, descriptor: &'a readonly GpuComputePipelineDescriptor): Result<GpuPipelineHandle, HostError>;
    createRenderPipeline(device: GpuDeviceHandle, descriptor: &'a readonly GpuRenderPipelineDescriptor): Result<GpuPipelineHandle, HostError>;
    pipelineBindGroupLayout(pipeline: GpuPipelineHandle, groupIndex: uint32): Result<GpuBindGroupLayoutHandle, HostError>;
    destroyPipeline(pipeline: GpuPipelineHandle): Result<void, HostError>;
}
```

[language/library/src/gpu/binding/pipeline.ds:517:596](https://github.com/destack-sh/destack/blob/main/language/library/src/gpu/binding/pipeline.ds#L517-L596)

## Members

### `createShader(device: GpuDeviceHandle, descriptor: &'a readonly GpuShaderDescriptor, bytes: &'b readonly [uint8]): Result<GpuShaderHandle, HostError>`

Create a shader module.

### `destroyShader(shader: GpuShaderHandle): Result<void, HostError>`

Destroy a shader module.

### `readShaderCompilation(shader: GpuShaderHandle, timeoutNs: uint64): Result<GpuCompilationInfo, HostError>`

Read a shader-compilation diagnostics snapshot.

### `createComputePipeline(device: GpuDeviceHandle, descriptor: &'a readonly GpuComputePipelineDescriptor): Result<GpuPipelineHandle, HostError>`

Create a compute pipeline.

### `createRenderPipeline(device: GpuDeviceHandle, descriptor: &'a readonly GpuRenderPipelineDescriptor): Result<GpuPipelineHandle, HostError>`

Create a render pipeline.

### `pipelineBindGroupLayout(pipeline: GpuPipelineHandle, groupIndex: uint32): Result<GpuBindGroupLayoutHandle, HostError>`

Resolve one bind-group layout from one pipeline.

### `destroyPipeline(pipeline: GpuPipelineHandle): Result<void, HostError>`

Destroy a pipeline object.
