Class VkMemoryBarrier

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class VkMemoryBarrier
    extends Struct
    implements NativeResource
    Structure specifying a global memory barrier.
    Description

    The first access scope is limited to access types in the source access mask specified by srcAccessMask.

    The second access scope is limited to access types in the destination access mask specified by dstAccessMask.

    Valid Usage (Implicit)
    • sType must be STRUCTURE_TYPE_MEMORY_BARRIER
    • pNext must be NULL
    • srcAccessMask must be a valid combination of VkAccessFlagBits values
    • dstAccessMask must be a valid combination of VkAccessFlagBits values
    See Also

    CmdPipelineBarrier, CmdWaitEvents

    Member documentation

    • sType – the type of this structure.
    • pNextNULL or a pointer to an extension-specific structure.
    • srcAccessMask – a bitmask of VkAccessFlagBits specifying a source access mask.
    • dstAccessMask – a bitmask of VkAccessFlagBits specifying a destination access mask.

    Layout

    
     struct VkMemoryBarrier {
         VkStructureType sType;
         void const * pNext;
         VkAccessFlags srcAccessMask;
         VkAccessFlags dstAccessMask;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • STYPE, PNEXT, SRCACCESSMASK, DSTACCESSMASK

        The struct member offsets.
    • Constructor Detail

      • VkMemoryBarrier

        public VkMemoryBarrier​(java.nio.ByteBuffer container)
        Creates a VkMemoryBarrier 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()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • sType

        public int sType()
        Returns the value of the sType field.
      • pNext

        public long pNext()
        Returns the value of the pNext field.
      • srcAccessMask

        public int srcAccessMask()
        Returns the value of the srcAccessMask field.
      • dstAccessMask

        public int dstAccessMask()
        Returns the value of the dstAccessMask field.
      • sType

        public VkMemoryBarrier sType​(int value)
        Sets the specified value to the sType field.
      • pNext

        public VkMemoryBarrier pNext​(long value)
        Sets the specified value to the pNext field.
      • srcAccessMask

        public VkMemoryBarrier srcAccessMask​(int value)
        Sets the specified value to the srcAccessMask field.
      • dstAccessMask

        public VkMemoryBarrier dstAccessMask​(int value)
        Sets the specified value to the dstAccessMask field.
      • set

        public VkMemoryBarrier set​(int sType,
                                   long pNext,
                                   int srcAccessMask,
                                   int dstAccessMask)
        Initializes this struct with the specified values.
      • set

        public VkMemoryBarrier set​(VkMemoryBarrier src)
        Copies the specified struct data to this struct.
        Parameters:
        src - the source struct
        Returns:
        this struct
      • createSafe

        @Nullable
        public static VkMemoryBarrier createSafe​(long address)
        Like create, but returns null if address is NULL.
      • create

        public static VkMemoryBarrier.Buffer create​(long address,
                                                    int capacity)
        Create a VkMemoryBarrier.Buffer instance at the specified memory.
        Parameters:
        address - the memory address
        capacity - the buffer capacity
      • createSafe

        @Nullable
        public static VkMemoryBarrier.Buffer createSafe​(long address,
                                                        int capacity)
        Like create, but returns null if address is NULL.
      • nsType

        public static int nsType​(long struct)
        Unsafe version of sType().
      • npNext

        public static long npNext​(long struct)
        Unsafe version of pNext().
      • nsrcAccessMask

        public static int nsrcAccessMask​(long struct)
        Unsafe version of srcAccessMask().
      • ndstAccessMask

        public static int ndstAccessMask​(long struct)
        Unsafe version of dstAccessMask().
      • nsType

        public static void nsType​(long struct,
                                  int value)
        Unsafe version of sType.
      • npNext

        public static void npNext​(long struct,
                                  long value)
        Unsafe version of pNext.
      • nsrcAccessMask

        public static void nsrcAccessMask​(long struct,
                                          int value)
        Unsafe version of srcAccessMask.
      • ndstAccessMask

        public static void ndstAccessMask​(long struct,
                                          int value)
        Unsafe version of dstAccessMask.