Class VkSampleLocationsInfoEXT

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

    public class VkSampleLocationsInfoEXT
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Structure specifying a set of sample locations.
    Description

    This structure can be used either to specify the sample locations to be used for rendering or to specify the set of sample locations an image subresource has been last rendered with for the purposes of layout transitions of depth/stencil images created with IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT.

    The sample locations in pSampleLocations specify sampleLocationsPerPixel number of sample locations for each pixel in the grid of the size specified in sampleLocationGridSize. The sample location for sample i at the pixel grid location (x,y) is taken from pSampleLocations[(x + y sampleLocationGridSize.width) sampleLocationsPerPixel + i].

    If the render pass has a fragment density map, the implementation will choose the sample locations for the fragment and the contents of pSampleLocations may be ignored.

    Valid Usage
    • sampleLocationsPerPixel must be a bit value that is set in VkPhysicalDeviceSampleLocationsPropertiesEXT::sampleLocationSampleCounts
    • sampleLocationsCount must equal sampleLocationsPerPixel × sampleLocationGridSize.width × sampleLocationGridSize.height
    Valid Usage (Implicit)
    • sType must be STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT
    • If sampleLocationsPerPixel is not 0, sampleLocationsPerPixel must be a valid VkSampleCountFlagBits value
    • If sampleLocationsCount is not 0, pSampleLocations must be a valid pointer to an array of sampleLocationsCount VkSampleLocationEXT structures
    See Also

    VkAttachmentSampleLocationsEXT, VkExtent2D, VkPipelineSampleLocationsStateCreateInfoEXT, VkSampleLocationEXT, VkSubpassSampleLocationsEXT, CmdSetSampleLocationsEXT

    Member documentation

    • sType – the type of this structure.
    • pNextNULL or a pointer to an extension-specific structure.
    • sampleLocationsPerPixel – a VkSampleCountFlagBits specifying the number of sample locations per pixel.
    • sampleLocationGridSize – the size of the sample location grid to select custom sample locations for.
    • sampleLocationsCount – the number of sample locations in pSampleLocations.
    • pSampleLocations – an array of sampleLocationsCount VkSampleLocationEXT structures.

    Layout

    
     struct VkSampleLocationsInfoEXT {
         VkStructureType sType;
         void const * pNext;
         VkSampleCountFlagBits sampleLocationsPerPixel;
         VkExtent2D sampleLocationGridSize;
         uint32_t sampleLocationsCount;
         VkSampleLocationEXT const * pSampleLocations;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • STYPE, PNEXT, SAMPLELOCATIONSPERPIXEL, SAMPLELOCATIONGRIDSIZE, SAMPLELOCATIONSCOUNT, PSAMPLELOCATIONS

        The struct member offsets.
    • Constructor Detail

      • VkSampleLocationsInfoEXT

        public VkSampleLocationsInfoEXT​(java.nio.ByteBuffer container)
        Creates a VkSampleLocationsInfoEXT 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
      • sType

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

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

        public int sampleLocationsPerPixel()
        Returns the value of the sampleLocationsPerPixel field.
      • sampleLocationGridSize

        public VkExtent2D sampleLocationGridSize()
        Returns a VkExtent2D view of the sampleLocationGridSize field.
      • sampleLocationsCount

        public int sampleLocationsCount()
        Returns the value of the sampleLocationsCount field.
      • sampleLocationsPerPixel

        public VkSampleLocationsInfoEXT sampleLocationsPerPixel​(int value)
        Sets the specified value to the sampleLocationsPerPixel field.
      • sampleLocationGridSize

        public VkSampleLocationsInfoEXT sampleLocationGridSize​(java.util.function.Consumer<VkExtent2D> consumer)
        Passes the sampleLocationGridSize field to the specified Consumer.
      • malloc

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

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

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

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

        public static VkSampleLocationsInfoEXT mallocStack()
        Returns a new VkSampleLocationsInfoEXT instance allocated on the thread-local MemoryStack.
      • callocStack

        public static VkSampleLocationsInfoEXT callocStack()
        Returns a new VkSampleLocationsInfoEXT instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

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

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

        public static VkSampleLocationsInfoEXT.Buffer callocStack​(int capacity,
                                                                  org.lwjgl.system.MemoryStack stack)
        Returns a new VkSampleLocationsInfoEXT.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • nsType

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

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

        public static int nsampleLocationsPerPixel​(long struct)
        Unsafe version of sampleLocationsPerPixel().
      • nsampleLocationsCount

        public static int nsampleLocationsCount​(long struct)
        Unsafe version of sampleLocationsCount().
      • 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.
      • nsampleLocationsPerPixel

        public static void nsampleLocationsPerPixel​(long struct,
                                                    int value)
        Unsafe version of sampleLocationsPerPixel.
      • nsampleLocationsCount

        public static void nsampleLocationsCount​(long struct,
                                                 int value)
        Sets the specified value to the sampleLocationsCount field of the specified struct.
      • validate

        public static void validate​(long struct)
        Validates pointer members that should not be NULL.
        Parameters:
        struct - the struct to validate
      • validate

        public static void validate​(long array,
                                    int count)
        Calls validate(long) for each struct contained in the specified struct array.
        Parameters:
        array - the struct array to validate
        count - the number of structs in array