Class VkDescriptorSetLayoutBinding

    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • BINDING, DESCRIPTORTYPE, DESCRIPTORCOUNT, STAGEFLAGS, PIMMUTABLESAMPLERS

        The struct member offsets.
    • Constructor Detail

      • VkDescriptorSetLayoutBinding

        public VkDescriptorSetLayoutBinding​(java.nio.ByteBuffer container)
        Creates a VkDescriptorSetLayoutBinding instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.

    • Method Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • binding

        public int binding()
        the binding number of this entry and corresponds to a resource of the same binding number in the shader stages.
      • descriptorType

        public int descriptorType()
        a VkDescriptorType specifying which type of resource descriptors are used for this binding.
      • descriptorCount

        public int descriptorCount()
        the number of descriptors contained in the binding, accessed in a shader as an array, except if descriptorType is DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK 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 int stageFlags()
        member is a bitmask of VkShaderStageFlagBits specifying which pipeline shader stages can access a resource for this binding. SHADER_STAGE_ALL is a shorthand specifying that all defined shader stages, including any additional stages defined by extensions, can access the resource.

        If a shader stage is not included in stageFlags, then a resource must not be accessed from that stage via this binding within any pipeline using the set layout. Other than input attachments which are limited to the fragment shader, there are no limitations on what combinations of stages can use a descriptor binding, and in particular a binding can be used by both graphics stages and the compute stage.

      • pImmutableSamplers

        @Nullable
        public java.nio.LongBuffer pImmutableSamplers()
        affects initialization of samplers. If descriptorType specifies a DESCRIPTOR_TYPE_SAMPLER or DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER type descriptor, then pImmutableSamplers can be used to initialize a set of immutable samplers. Immutable samplers are permanently bound into the set layout and must not be changed; updating a DESCRIPTOR_TYPE_SAMPLER descriptor with immutable samplers is not allowed and updates to a DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER descriptor with immutable samplers does not modify the samplers (the image views are updated, but the sampler updates are ignored). If pImmutableSamplers is not NULL, then it is a pointer to an array of sampler handles that will be copied into the set layout and used for the corresponding binding. Only the sampler handles are copied; the sampler objects must not be destroyed before the final use of the set layout and any descriptor pools and sets created using it. If pImmutableSamplers is NULL, then the sampler slots are dynamic and sampler handles must be bound into descriptor sets using this layout. If descriptorType is not one of these descriptor types, then pImmutableSamplers is ignored.
      • set

        public VkDescriptorSetLayoutBinding set​(int binding,
                                                int descriptorType,
                                                int descriptorCount,
                                                int stageFlags,
                                                @Nullable
                                                java.nio.LongBuffer pImmutableSamplers)
        Initializes this struct with the specified values.
      • malloc

        public static VkDescriptorSetLayoutBinding malloc()
        Returns a new VkDescriptorSetLayoutBinding instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static VkDescriptorSetLayoutBinding calloc()
        Returns a new VkDescriptorSetLayoutBinding instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static VkDescriptorSetLayoutBinding create()
        Returns a new VkDescriptorSetLayoutBinding instance allocated with BufferUtils.
      • create

        public static VkDescriptorSetLayoutBinding create​(long address)
        Returns a new VkDescriptorSetLayoutBinding instance for the specified memory address.
      • malloc

        public static VkDescriptorSetLayoutBinding malloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new VkDescriptorSetLayoutBinding instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • calloc

        public static VkDescriptorSetLayoutBinding calloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new VkDescriptorSetLayoutBinding instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • nbinding

        public static int nbinding​(long struct)
        Unsafe version of binding().
      • ndescriptorType

        public static int ndescriptorType​(long struct)
        Unsafe version of descriptorType().
      • ndescriptorCount

        public static int ndescriptorCount​(long struct)
        Unsafe version of descriptorCount().
      • nstageFlags

        public static int nstageFlags​(long struct)
        Unsafe version of stageFlags().
      • npImmutableSamplers

        @Nullable
        public static java.nio.LongBuffer npImmutableSamplers​(long struct)
        Unsafe version of pImmutableSamplers.
      • nbinding

        public static void nbinding​(long struct,
                                    int value)
        Unsafe version of binding.
      • ndescriptorType

        public static void ndescriptorType​(long struct,
                                           int value)
        Unsafe version of descriptorType.
      • ndescriptorCount

        public static void ndescriptorCount​(long struct,
                                            int value)
        Sets the specified value to the descriptorCount field of the specified struct.
      • nstageFlags

        public static void nstageFlags​(long struct,
                                       int value)
        Unsafe version of stageFlags.
      • npImmutableSamplers

        public static void npImmutableSamplers​(long struct,
                                               @Nullable
                                               java.nio.LongBuffer value)
        Unsafe version of pImmutableSamplers.