# GPUFragmentState

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

*** ** * ** ***


```
public final class GPUFragmentState
```

<br />

*** ** * ** ***

Describes the fragment shader stage of a render pipeline.

## Summary

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

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/webgpu/GPUFragmentState#GPUFragmentState(androidx.webgpu.GPUShaderModule,kotlin.String,kotlin.Array,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, @https://developer.android.com/reference/androidx/annotation/NonNull GPUColorTargetState[] targets )` |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull GPUConstantEntry[]` | `https://developer.android.com/reference/androidx/webgpu/GPUFragmentState#getConstants()()` An array of pipeline-overridable constants. |
| `final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/webgpu/GPUFragmentState#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/GPUFragmentState#getModule()()` The shader module containing the fragment shader. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull GPUColorTargetState[]` | `https://developer.android.com/reference/androidx/webgpu/GPUFragmentState#getTargets()()` An array of color target states. |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUFragmentState#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/GPUFragmentState#setEntryPoint(kotlin.String)(https://developer.android.com/reference/java/lang/String.html value)` |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUFragmentState#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 fragment shader. |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUFragmentState#setTargets(kotlin.Array)(@https://developer.android.com/reference/androidx/annotation/NonNull GPUColorTargetState[] value)` An array of color target states. |

## Public constructors

### GPUFragmentState

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

```
public GPUFragmentState(
    @NonNull GPUShaderModule module,
    String entryPoint,
    @NonNull GPUConstantEntry[] constants,
    @NonNull GPUColorTargetState[] targets
)
```

## 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 fragment shader.

### getTargets

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

```
public final @NonNull GPUColorTargetState[] getTargets()
```

An array of color target states.

### 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 fragment shader.

### setTargets

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

```
public final void setTargets(@NonNull GPUColorTargetState[] value)
```

An array of color target states.