# GPULimits.Builder

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

*** ** * ** ***


```
class GPULimits.Builder
```

<br />

*** ** * ** ***

Builder for `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#Builder()()` |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#build()()` Builds the `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits`. |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setCompatibilityModeLimits(androidx.webgpu.GPUCompatibilityModeLimits)( compatibilityModeLimits: https://developer.android.com/reference/kotlin/androidx/webgpu/GPUCompatibilityModeLimits? )` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxBindGroups(kotlin.Int)(maxBindGroups: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxBindGroupsPlusVertexBuffers(kotlin.Int)(maxBindGroupsPlusVertexBuffers: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxBindingsPerBindGroup(kotlin.Int)(maxBindingsPerBindGroup: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxBufferSize(kotlin.Long)(maxBufferSize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxColorAttachmentBytesPerSample(kotlin.Int)( maxColorAttachmentBytesPerSample: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxColorAttachments(kotlin.Int)(maxColorAttachments: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxComputeInvocationsPerWorkgroup(kotlin.Int)( maxComputeInvocationsPerWorkgroup: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxComputeWorkgroupSizeX(kotlin.Int)(maxComputeWorkgroupSizeX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxComputeWorkgroupSizeY(kotlin.Int)(maxComputeWorkgroupSizeY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxComputeWorkgroupSizeZ(kotlin.Int)(maxComputeWorkgroupSizeZ: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxComputeWorkgroupStorageSize(kotlin.Int)(maxComputeWorkgroupStorageSize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxComputeWorkgroupsPerDimension(kotlin.Int)( maxComputeWorkgroupsPerDimension: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxDynamicStorageBuffersPerPipelineLayout(kotlin.Int)( maxDynamicStorageBuffersPerPipelineLayout: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxDynamicUniformBuffersPerPipelineLayout(kotlin.Int)( maxDynamicUniformBuffersPerPipelineLayout: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxImmediateSize(kotlin.Int)(maxImmediateSize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxInterStageShaderVariables(kotlin.Int)(maxInterStageShaderVariables: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxSampledTexturesPerShaderStage(kotlin.Int)( maxSampledTexturesPerShaderStage: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxSamplersPerShaderStage(kotlin.Int)(maxSamplersPerShaderStage: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxStorageBufferBindingSize(kotlin.Long)(maxStorageBufferBindingSize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxStorageBuffersPerShaderStage(kotlin.Int)( maxStorageBuffersPerShaderStage: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxStorageTexturesPerShaderStage(kotlin.Int)( maxStorageTexturesPerShaderStage: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxTextureArrayLayers(kotlin.Int)(maxTextureArrayLayers: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxTextureDimension1D(kotlin.Int)(maxTextureDimension1D: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxTextureDimension2D(kotlin.Int)(maxTextureDimension2D: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxTextureDimension3D(kotlin.Int)(maxTextureDimension3D: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxUniformBufferBindingSize(kotlin.Long)(maxUniformBufferBindingSize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxUniformBuffersPerShaderStage(kotlin.Int)( maxUniformBuffersPerShaderStage: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxVertexAttributes(kotlin.Int)(maxVertexAttributes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxVertexBufferArrayStride(kotlin.Int)(maxVertexBufferArrayStride: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMaxVertexBuffers(kotlin.Int)(maxVertexBuffers: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMinStorageBufferOffsetAlignment(kotlin.Int)( minStorageBufferOffsetAlignment: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits.Builder#setMinUniformBufferOffsetAlignment(kotlin.Int)( minUniformBufferOffsetAlignment: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` |

## Public constructors

### Builder

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

```
Builder()
```

## Public functions

### build

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

```
fun build(): GPULimits
```

Builds the `https://developer.android.com/reference/kotlin/androidx/webgpu/GPULimits`.

### setCompatibilityModeLimits

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

```
fun setCompatibilityModeLimits(
    compatibilityModeLimits: GPUCompatibilityModeLimits?
): GPULimits.Builder
```

### setMaxBindGroups

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

```
fun setMaxBindGroups(maxBindGroups: Int): GPULimits.Builder
```

### setMaxBindGroupsPlusVertexBuffers

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

```
fun setMaxBindGroupsPlusVertexBuffers(maxBindGroupsPlusVertexBuffers: Int): GPULimits.Builder
```

### setMaxBindingsPerBindGroup

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

```
fun setMaxBindingsPerBindGroup(maxBindingsPerBindGroup: Int): GPULimits.Builder
```

### setMaxBufferSize

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

```
fun setMaxBufferSize(maxBufferSize: Long): GPULimits.Builder
```

### setMaxColorAttachmentBytesPerSample

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

```
fun setMaxColorAttachmentBytesPerSample(
    maxColorAttachmentBytesPerSample: Int
): GPULimits.Builder
```

### setMaxColorAttachments

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

```
fun setMaxColorAttachments(maxColorAttachments: Int): GPULimits.Builder
```

### setMaxComputeInvocationsPerWorkgroup

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

```
fun setMaxComputeInvocationsPerWorkgroup(
    maxComputeInvocationsPerWorkgroup: Int
): GPULimits.Builder
```

### setMaxComputeWorkgroupSizeX

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

```
fun setMaxComputeWorkgroupSizeX(maxComputeWorkgroupSizeX: Int): GPULimits.Builder
```

### setMaxComputeWorkgroupSizeY

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

```
fun setMaxComputeWorkgroupSizeY(maxComputeWorkgroupSizeY: Int): GPULimits.Builder
```

### setMaxComputeWorkgroupSizeZ

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

```
fun setMaxComputeWorkgroupSizeZ(maxComputeWorkgroupSizeZ: Int): GPULimits.Builder
```

### setMaxComputeWorkgroupStorageSize

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

```
fun setMaxComputeWorkgroupStorageSize(maxComputeWorkgroupStorageSize: Int): GPULimits.Builder
```

### setMaxComputeWorkgroupsPerDimension

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

```
fun setMaxComputeWorkgroupsPerDimension(
    maxComputeWorkgroupsPerDimension: Int
): GPULimits.Builder
```

### setMaxDynamicStorageBuffersPerPipelineLayout

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

```
fun setMaxDynamicStorageBuffersPerPipelineLayout(
    maxDynamicStorageBuffersPerPipelineLayout: Int
): GPULimits.Builder
```

### setMaxDynamicUniformBuffersPerPipelineLayout

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

```
fun setMaxDynamicUniformBuffersPerPipelineLayout(
    maxDynamicUniformBuffersPerPipelineLayout: Int
): GPULimits.Builder
```

### setMaxImmediateSize

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

```
fun setMaxImmediateSize(maxImmediateSize: Int): GPULimits.Builder
```

### setMaxInterStageShaderVariables

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

```
fun setMaxInterStageShaderVariables(maxInterStageShaderVariables: Int): GPULimits.Builder
```

### setMaxSampledTexturesPerShaderStage

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

```
fun setMaxSampledTexturesPerShaderStage(
    maxSampledTexturesPerShaderStage: Int
): GPULimits.Builder
```

### setMaxSamplersPerShaderStage

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

```
fun setMaxSamplersPerShaderStage(maxSamplersPerShaderStage: Int): GPULimits.Builder
```

### setMaxStorageBufferBindingSize

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

```
fun setMaxStorageBufferBindingSize(maxStorageBufferBindingSize: Long): GPULimits.Builder
```

### setMaxStorageBuffersPerShaderStage

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

```
fun setMaxStorageBuffersPerShaderStage(
    maxStorageBuffersPerShaderStage: Int
): GPULimits.Builder
```

### setMaxStorageTexturesPerShaderStage

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

```
fun setMaxStorageTexturesPerShaderStage(
    maxStorageTexturesPerShaderStage: Int
): GPULimits.Builder
```

### setMaxTextureArrayLayers

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

```
fun setMaxTextureArrayLayers(maxTextureArrayLayers: Int): GPULimits.Builder
```

### setMaxTextureDimension1D

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

```
fun setMaxTextureDimension1D(maxTextureDimension1D: Int): GPULimits.Builder
```

### setMaxTextureDimension2D

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

```
fun setMaxTextureDimension2D(maxTextureDimension2D: Int): GPULimits.Builder
```

### setMaxTextureDimension3D

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

```
fun setMaxTextureDimension3D(maxTextureDimension3D: Int): GPULimits.Builder
```

### setMaxUniformBufferBindingSize

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

```
fun setMaxUniformBufferBindingSize(maxUniformBufferBindingSize: Long): GPULimits.Builder
```

### setMaxUniformBuffersPerShaderStage

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

```
fun setMaxUniformBuffersPerShaderStage(
    maxUniformBuffersPerShaderStage: Int
): GPULimits.Builder
```

### setMaxVertexAttributes

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

```
fun setMaxVertexAttributes(maxVertexAttributes: Int): GPULimits.Builder
```

### setMaxVertexBufferArrayStride

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

```
fun setMaxVertexBufferArrayStride(maxVertexBufferArrayStride: Int): GPULimits.Builder
```

### setMaxVertexBuffers

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

```
fun setMaxVertexBuffers(maxVertexBuffers: Int): GPULimits.Builder
```

### setMinStorageBufferOffsetAlignment

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

```
fun setMinStorageBufferOffsetAlignment(
    minStorageBufferOffsetAlignment: Int
): GPULimits.Builder
```

### setMinUniformBufferOffsetAlignment

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

```
fun setMinUniformBufferOffsetAlignment(
    minUniformBufferOffsetAlignment: Int
): GPULimits.Builder
```