# GpuCompareFunction

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

Depth or stencil compare selector.

```ds title="GpuCompareFunction"
export enum GpuCompareFunction {
    Never = 1,
    Less = 2,
    Equal = 3,
    LessEqual = 4,
    Greater = 5,
    NotEqual = 6,
    GreaterEqual = 7,
    Always = 8,
}
```

[language/library/src/gpu/binding/resource.ds:361:378](https://github.com/destack-sh/destack/blob/main/language/library/src/gpu/binding/resource.ds#L361-L378)

## Variants

### `Never = 1`

Comparison always fails.

### `Less = 2`

Pass when source is less than destination.

### `Equal = 3`

Pass when source equals destination.

### `LessEqual = 4`

Pass when source is less than or equal to destination.

### `Greater = 5`

Pass when source is greater than destination.

### `NotEqual = 6`

Pass when source does not equal destination.

### `GreaterEqual = 7`

Pass when source is greater than or equal to destination.

### `Always = 8`

Comparison always passes.
