Skip to content

BindGroupLayoutEntry

data class BindGroupLayoutEntry(
    val binding: GPUIndex32, 
    val visibility: GPUShaderStage, 
    val buffer: GPUBufferBindingLayout? = null, 
    val sampler: GPUSamplerBindingLayout? = null, 
    val texture: GPUTextureBindingLayout? = null, 
    val storageTexture: GPUStorageTextureBindingLayout? = null
) : GPUBindGroupLayoutEntry
Describes one binding's index, shader visibility, and resource-specific layout.

Constructors

BindGroupLayoutEntry

constructor(
    binding: GPUIndex32, 
    visibility: GPUShaderStage, 
    buffer: GPUBufferBindingLayout? = null, 
    sampler: GPUSamplerBindingLayout? = null, 
    texture: GPUTextureBindingLayout? = null, 
    storageTexture: GPUStorageTextureBindingLayout? = null
)

Properties

binding

open override val binding: GPUIndex32
A unique identifier for a resource binding within the GPUBindGroupLayout, corresponding to a GPUBindGroupEntry.binding and a @binding attribute in the GPUShaderModule.

buffer

open override val buffer: GPUBufferBindingLayout?
Exactly one of these members must be set, indicating the binding type. The contents of the member specify options specific to that type. The corresponding resource in createBindGroup() requires the corresponding binding resource type for this binding.

sampler

open override val sampler: GPUSamplerBindingLayout?
Exactly one of these members must be set, indicating the binding type. The contents of the member specify options specific to that type. The corresponding resource in createBindGroup() requires the corresponding binding resource type for this binding.

storageTexture

open override val storageTexture: GPUStorageTextureBindingLayout?
Exactly one of these members must be set, indicating the binding type. The contents of the member specify options specific to that type. The corresponding resource in createBindGroup() requires the corresponding binding resource type for this binding.

texture

open override val texture: GPUTextureBindingLayout?
Exactly one of these members must be set, indicating the binding type. The contents of the member specify options specific to that type. The corresponding resource in createBindGroup() requires the corresponding binding resource type for this binding.

visibility

open override val visibility: GPUShaderStage
A bitset of the members of GPUShaderStage. Each set bit indicates that a GPUBindGroupLayoutEntry’s resource will be accessible from the associated shader stage.