Class VulkanDescriptorSetLayoutBinding

    • Method Detail

      • binding

        public int binding()
        Specified by:
        binding in interface VulkanDescriptorSetLayoutBindingType
        Returns:
        The binding number of this entry and corresponds to a resource of the same binding number in the shader stages
      • descriptorCount

        public int descriptorCount()
        Specified by:
        descriptorCount in interface VulkanDescriptorSetLayoutBindingType
        Returns:
        The number of descriptors contained in the binding, accessed in a shader as an array , except if descriptorType is VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT in which case descriptorCount is the size in bytes of the inline uniform block . If descriptorCount is zero this binding entry is reserved and the resource must not be accessed from any stage via this binding within any pipeline using the set layout.
      • stageFlags

        public java.util.Set<VulkanShaderStageFlag> stageFlags()
        Specified by:
        stageFlags in interface VulkanDescriptorSetLayoutBindingType
        Returns:
        A set of VulkanShaderStageFlag values specifying which pipeline shader stages can access a resource for this binding. VK_SHADER_STAGE_ALL is a shorthand specifying that all defined shader stages, including any additional stages defined by extensions, can access the resource.
      • withBinding

        public final VulkanDescriptorSetLayoutBinding withBinding​(int value)
        Copy the current immutable object by setting a value for the binding attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for binding
        Returns:
        A modified copy of the this object
      • withDescriptorType

        public final VulkanDescriptorSetLayoutBinding withDescriptorType​(VulkanDescriptorType value)
        Copy the current immutable object by setting a value for the descriptorType attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for descriptorType
        Returns:
        A modified copy of the this object
      • withDescriptorCount

        public final VulkanDescriptorSetLayoutBinding withDescriptorCount​(int value)
        Copy the current immutable object by setting a value for the descriptorCount attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for descriptorCount
        Returns:
        A modified copy of the this object
      • withStageFlags

        public final VulkanDescriptorSetLayoutBinding withStageFlags​(java.lang.Iterable<VulkanShaderStageFlag> elements)
        Copy the current immutable object with elements that replace the content of stageFlags. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of stageFlags elements to set
        Returns:
        A modified copy of this object
      • withImmutableSamplers

        public final VulkanDescriptorSetLayoutBinding withImmutableSamplers​(java.lang.Iterable<? extends VulkanSamplerType> elements)
        Copy the current immutable object with elements that replace the content of immutableSamplers. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of immutableSamplers elements to set
        Returns:
        A modified copy of this object
      • equals

        public boolean equals​(java.lang.Object another)
        This instance is equal to all instances of VulkanDescriptorSetLayoutBinding that have equal attribute values.
        Overrides:
        equals in class java.lang.Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: binding, descriptorType, descriptorCount, stageFlags, immutableSamplers.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

        public java.lang.String toString()
        Prints the immutable value VulkanDescriptorSetLayoutBinding with attribute values.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representation of the value
      • of

        public static VulkanDescriptorSetLayoutBinding of​(int binding,
                                                          VulkanDescriptorType descriptorType,
                                                          int descriptorCount,
                                                          java.util.Set<VulkanShaderStageFlag> stageFlags,
                                                          java.util.List<VulkanSamplerType> immutableSamplers)
        Construct a new immutable VulkanDescriptorSetLayoutBinding instance.
        Parameters:
        binding - The value for the binding attribute
        descriptorType - The value for the descriptorType attribute
        descriptorCount - The value for the descriptorCount attribute
        stageFlags - The value for the stageFlags attribute
        immutableSamplers - The value for the immutableSamplers attribute
        Returns:
        An immutable VulkanDescriptorSetLayoutBinding instance
      • of

        public static VulkanDescriptorSetLayoutBinding of​(int binding,
                                                          VulkanDescriptorType descriptorType,
                                                          int descriptorCount,
                                                          java.lang.Iterable<VulkanShaderStageFlag> stageFlags,
                                                          java.lang.Iterable<? extends VulkanSamplerType> immutableSamplers)
        Construct a new immutable VulkanDescriptorSetLayoutBinding instance.
        Parameters:
        binding - The value for the binding attribute
        descriptorType - The value for the descriptorType attribute
        descriptorCount - The value for the descriptorCount attribute
        stageFlags - The value for the stageFlags attribute
        immutableSamplers - The value for the immutableSamplers attribute
        Returns:
        An immutable VulkanDescriptorSetLayoutBinding instance