# GPUComputeState

Artifact: [androidx.webgpu:webgpu](https://developer.android.com/jetpack/androidx/releases/webgpu) [View Source](https://cs.android.com/search?q=file:androidx/webgpu/GPUComputeState.kt+class:androidx.webgpu.GPUComputeState) Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

*** ** * ** ***


```
public final class GPUComputeState
```

<br />

*** ** * ** ***

Describes the compute shader stage of a pipeline.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/webgpu/GPUComputeState.Builder` Builder for `https://developer.android.com/reference/androidx/webgpu/GPUComputeState`. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/webgpu/GPUComputeState#GPUComputeState(androidx.webgpu.GPUShaderModule,kotlin.String,kotlin.Array)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUShaderModule module, https://developer.android.com/reference/java/lang/String.html entryPoint, @https://developer.android.com/reference/androidx/annotation/NonNull GPUConstantEntry[] constants )` |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull GPUConstantEntry[]` | `https://developer.android.com/reference/androidx/webgpu/GPUComputeState#getConstants()()` An array of pipeline-overridable constants. |
| `final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/webgpu/GPUComputeState#getEntryPoint()()` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUShaderModule` | `https://developer.android.com/reference/androidx/webgpu/GPUComputeState#getModule()()` The shader module containing the compute shader. |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUComputeState#setConstants(kotlin.Array)(@https://developer.android.com/reference/androidx/annotation/NonNull GPUConstantEntry[] value)` An array of pipeline-overridable constants. |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUComputeState#setEntryPoint(kotlin.String)(https://developer.android.com/reference/java/lang/String.html value)` |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUComputeState#setModule(androidx.webgpu.GPUShaderModule)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUShaderModule value)` The shader module containing the compute shader. |

## Public constructors

### GPUComputeState

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
public GPUComputeState(
    @NonNull GPUShaderModule module,
    String entryPoint,
    @NonNull GPUConstantEntry[] constants
)
```

## Public methods

### getConstants

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
public final @NonNull GPUConstantEntry[] getConstants()
```

An array of pipeline-overridable constants.

### getEntryPoint

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
public final String getEntryPoint()
```

### getModule

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
public final @NonNull GPUShaderModule getModule()
```

The shader module containing the compute shader.

### setConstants

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
public final void setConstants(@NonNull GPUConstantEntry[] value)
```

An array of pipeline-overridable constants.

### setEntryPoint

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
public final void setEntryPoint(String value)
```

### setModule

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
public final void setModule(@NonNull GPUShaderModule value)
```

The shader module containing the compute shader.