# GPUTextureViewDescriptor

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

*** ** * ** ***


```
class GPUTextureViewDescriptor
```

<br />

*** ** * ** ***

Describes a texture view.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/webgpu/GPUTextureViewDescriptor.Builder` Builder for `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUTextureViewDescriptor`. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUTextureViewDescriptor#GPUTextureViewDescriptor(kotlin.String,kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int,androidx.webgpu.GPUTextureComponentSwizzleDescriptor)( label: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, format: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, dimension: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, baseMipLevel: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, mipLevelCount: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, baseArrayLayer: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, arrayLayerCount: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, aspect: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, usage: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, textureComponentSwizzleDescriptor: https://developer.android.com/reference/kotlin/androidx/webgpu/GPUTextureComponentSwizzleDescriptor? )` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUTextureViewDescriptor#arrayLayerCount()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUTextureViewDescriptor#aspect()` The texture aspect for the view. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUTextureViewDescriptor#baseArrayLayer()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUTextureViewDescriptor#baseMipLevel()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUTextureViewDescriptor#dimension()` The dimension of the texture view. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUTextureViewDescriptor#format()` The format of the texture view. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUTextureViewDescriptor#label()` A human-readable label for debugging. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUTextureViewDescriptor#mipLevelCount()` |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUTextureComponentSwizzleDescriptor?` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUTextureViewDescriptor#textureComponentSwizzleDescriptor()` An extension chained to a texture view descriptor to define a custom component swizzle. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/GPUTextureViewDescriptor#usage()` The usage of the texture view. |

## Public constructors

### GPUTextureViewDescriptor

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

```
GPUTextureViewDescriptor(
    label: String? = null,
    format: Int = TextureFormat.Undefined,
    dimension: Int = TextureViewDimension.Undefined,
    baseMipLevel: Int = 0,
    mipLevelCount: Int = Constants.MIP_LEVEL_COUNT_UNDEFINED,
    baseArrayLayer: Int = 0,
    arrayLayerCount: Int = Constants.ARRAY_LAYER_COUNT_UNDEFINED,
    aspect: Int = TextureAspect.All,
    usage: Int = TextureUsage.None,
    textureComponentSwizzleDescriptor: GPUTextureComponentSwizzleDescriptor? = null
)
```

## Public properties

### arrayLayerCount

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

```
var arrayLayerCount: Int
```

### aspect

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

```
var aspect: Int
```

The texture aspect for the view. Defaults to @see `https://developer.android.com/reference/kotlin/androidx/webgpu/TextureAspect#All()`.

Value is one of the following:

- `0`
- `1`
- `2`
- `3`

<br />

### baseArrayLayer

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

```
var baseArrayLayer: Int
```

### baseMipLevel

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

```
var baseMipLevel: Int
```

### dimension

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

```
var dimension: Int
```

The dimension of the texture view.

Value is one of the following:

- `0`
- `1`
- `2`
- `3`
- `4`
- `5`
- `6`

<br />

### format

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

```
var format: Int
```

The format of the texture view.

Value is one of the following:

- `0`
- `1`
- `2`
- `3`
- `4`
- `5`
- `6`
- `7`
- `8`
- `9`
- `10`
- `11`
- `12`
- `13`
- `14`
- `15`
- `16`
- `17`
- `18`
- `19`
- `20`
- `21`
- `22`
- `23`
- `24`
- `25`
- `26`
- `27`
- `28`
- `29`
- `30`
- `31`
- `32`
- `33`
- `34`
- `35`
- `36`
- `37`
- `38`
- `39`
- `40`
- `41`
- `42`
- `43`
- `44`
- `45`
- `46`
- `47`
- `48`
- `49`
- `50`
- `51`
- `52`
- `53`
- `54`
- `55`
- `56`
- `57`
- `58`
- `59`
- `60`
- `61`
- `62`
- `63`
- `64`
- `65`
- `66`
- `67`
- `68`
- `69`
- `70`
- `71`
- `72`
- `73`
- `74`
- `75`
- `76`
- `77`
- `78`
- `79`
- `80`
- `81`
- `82`
- `83`
- `84`
- `85`
- `86`
- `87`
- `88`
- `89`
- `90`
- `91`
- `92`
- `93`
- `94`
- `95`
- `96`
- `97`
- `98`
- `99`
- `100`
- `101`

<br />

### label

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

```
var label: String?
```

A human-readable label for debugging.

### mipLevelCount

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

```
var mipLevelCount: Int
```

### textureComponentSwizzleDescriptor

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

```
var textureComponentSwizzleDescriptor: GPUTextureComponentSwizzleDescriptor?
```

An extension chained to a texture view descriptor to define a custom component swizzle. This allows remapping or forcing specific values for the R, G, B, and A channels when accessing the texture view.

### usage

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

```
var usage: Int
```

The usage of the texture view.

Value is either `0` or a combination of the following:

- `0`
- `1`
- `2`
- `4`
- `8`
- `16`
- `32`

<br />