GPUBindGroupLayoutEntry


public final class GPUBindGroupLayoutEntry


A single entry within a bind group layout, defining a resource binding slot.

Summary

Public constructors

GPUBindGroupLayoutEntry(
    int binding,
    int visibility,
    int bindingArraySize,
    @NonNull GPUBufferBindingLayout buffer,
    @NonNull GPUSamplerBindingLayout sampler,
    @NonNull GPUTextureBindingLayout texture,
    @NonNull GPUStorageTextureBindingLayout storageTexture
)

Public methods

final int

The binding index corresponding to a @binding attribute in the shader.

final int
final @NonNull GPUBufferBindingLayout

The required constraints if the binding is a buffer.

final @NonNull GPUSamplerBindingLayout

The required constraints if the binding is a sampler.

final @NonNull GPUStorageTextureBindingLayout
final @NonNull GPUTextureBindingLayout

The required constraints if the binding is a sampled texture.

final int

The shader stages where this binding is visible.

final void
setBinding(int binding)

The binding index corresponding to a @binding attribute in the shader.

final void
setBindingArraySize(int bindingArraySize)
final void

The required constraints if the binding is a buffer.

final void

The required constraints if the binding is a sampler.

final void
final void

The required constraints if the binding is a sampled texture.

final void
setVisibility(int visibility)

The shader stages where this binding is visible.

Public constructors

GPUBindGroupLayoutEntry

Added in 1.0.0-alpha02
public GPUBindGroupLayoutEntry(
    int binding,
    int visibility,
    int bindingArraySize,
    @NonNull GPUBufferBindingLayout buffer,
    @NonNull GPUSamplerBindingLayout sampler,
    @NonNull GPUTextureBindingLayout texture,
    @NonNull GPUStorageTextureBindingLayout storageTexture
)

Public methods

getBinding

Added in 1.0.0-alpha02
public final int getBinding()

The binding index corresponding to a @binding attribute in the shader.

getBindingArraySize

Added in 1.0.0-alpha02
public final int getBindingArraySize()

getBuffer

Added in 1.0.0-alpha02
public final @NonNull GPUBufferBindingLayout getBuffer()

The required constraints if the binding is a buffer.

getSampler

Added in 1.0.0-alpha02
public final @NonNull GPUSamplerBindingLayout getSampler()

The required constraints if the binding is a sampler.

getStorageTexture

Added in 1.0.0-alpha02
public final @NonNull GPUStorageTextureBindingLayout getStorageTexture()

getTexture

Added in 1.0.0-alpha02
public final @NonNull GPUTextureBindingLayout getTexture()

The required constraints if the binding is a sampled texture.

getVisibility

Added in 1.0.0-alpha02
public final int getVisibility()

The shader stages where this binding is visible.

setBinding

Added in 1.0.0-alpha02
public final void setBinding(int binding)

The binding index corresponding to a @binding attribute in the shader.

setBindingArraySize

Added in 1.0.0-alpha02
public final void setBindingArraySize(int bindingArraySize)

setBuffer

Added in 1.0.0-alpha02
public final void setBuffer(@NonNull GPUBufferBindingLayout buffer)

The required constraints if the binding is a buffer.

setSampler

Added in 1.0.0-alpha02
public final void setSampler(@NonNull GPUSamplerBindingLayout sampler)

The required constraints if the binding is a sampler.

setStorageTexture

Added in 1.0.0-alpha02
public final void setStorageTexture(
    @NonNull GPUStorageTextureBindingLayout storageTexture
)

setTexture

Added in 1.0.0-alpha02
public final void setTexture(@NonNull GPUTextureBindingLayout texture)

The required constraints if the binding is a sampled texture.

setVisibility

Added in 1.0.0-alpha02
public final void setVisibility(int visibility)

The shader stages where this binding is visible.