Class VkShaderStatisticsInfoAMD

  • All Implemented Interfaces:
    Pointer

    public class VkShaderStatisticsInfoAMD
    extends Struct
    Statistical information about a particular shader within a pipeline.
    Description

    Some implementations may merge multiple logical shader stages together in a single shader. In such cases, shaderStageMask will contain a bitmask of all of the stages that are active within that shader. Consequently, if specifying those stages as input to GetShaderInfoAMD, the same output information may be returned for all such shader stage queries.

    The number of available VGPRs and SGPRs (numAvailableVgprs and numAvailableSgprs respectively) are the shader-addressable subset of physical registers that is given as a limit to the compiler for register assignment. These values may further be limited by implementations due to performance optimizations where register pressure is a bottleneck.

    See Also

    VkShaderResourceUsageAMD

    Member documentation

    • shaderStageMask – are the combination of logical shader stages contained within this shader.
    • resourceUsage – an instance of VkShaderResourceUsageAMD describing internal physical device resources used by this shader.
    • numPhysicalVgprs – the maximum number of vector instruction general-purpose registers (VGPRs) available to the physical device.
    • numPhysicalSgprs – the maximum number of scalar instruction general-purpose registers (SGPRs) available to the physical device.
    • numAvailableVgprs – the maximum limit of VGPRs made available to the shader compiler.
    • numAvailableSgprs – the maximum limit of SGPRs made available to the shader compiler.
    • computeWorkGroupSize – the local workgroup size of this shader in { X, Y, Z } dimensions.

    Layout

    
     struct VkShaderStatisticsInfoAMD {
         VkShaderStageFlags shaderStageMask;
         VkShaderResourceUsageAMD resourceUsage;
         uint32_t numPhysicalVgprs;
         uint32_t numPhysicalSgprs;
         uint32_t numAvailableVgprs;
         uint32_t numAvailableSgprs;
         uint32_t computeWorkGroupSize[3];
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • SHADERSTAGEMASK, RESOURCEUSAGE, NUMPHYSICALVGPRS, NUMPHYSICALSGPRS, NUMAVAILABLEVGPRS, NUMAVAILABLESGPRS, COMPUTEWORKGROUPSIZE

        The struct member offsets.
    • Constructor Detail

      • VkShaderStatisticsInfoAMD

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

        public int shaderStageMask()
        Returns the value of the shaderStageMask field.
      • numPhysicalVgprs

        public int numPhysicalVgprs()
        Returns the value of the numPhysicalVgprs field.
      • numPhysicalSgprs

        public int numPhysicalSgprs()
        Returns the value of the numPhysicalSgprs field.
      • numAvailableVgprs

        public int numAvailableVgprs()
        Returns the value of the numAvailableVgprs field.
      • numAvailableSgprs

        public int numAvailableSgprs()
        Returns the value of the numAvailableSgprs field.
      • computeWorkGroupSize

        public java.nio.IntBuffer computeWorkGroupSize()
        Returns a IntBuffer view of the computeWorkGroupSize field.
      • computeWorkGroupSize

        public int computeWorkGroupSize​(int index)
        Returns the value at the specified index of the computeWorkGroupSize field.
      • nshaderStageMask

        public static int nshaderStageMask​(long struct)
        Unsafe version of shaderStageMask().
      • nnumPhysicalVgprs

        public static int nnumPhysicalVgprs​(long struct)
        Unsafe version of numPhysicalVgprs().
      • nnumPhysicalSgprs

        public static int nnumPhysicalSgprs​(long struct)
        Unsafe version of numPhysicalSgprs().
      • nnumAvailableVgprs

        public static int nnumAvailableVgprs​(long struct)
        Unsafe version of numAvailableVgprs().
      • nnumAvailableSgprs

        public static int nnumAvailableSgprs​(long struct)
        Unsafe version of numAvailableSgprs().
      • ncomputeWorkGroupSize

        public static java.nio.IntBuffer ncomputeWorkGroupSize​(long struct)
        Unsafe version of computeWorkGroupSize().
      • ncomputeWorkGroupSize

        public static int ncomputeWorkGroupSize​(long struct,
                                                int index)
        Unsafe version of computeWorkGroupSize.