Class VkShaderStatisticsInfoAMD

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkShaderStatisticsInfoAMD>
org.lwjgl.vulkan.VkShaderStatisticsInfoAMD
All Implemented Interfaces:
org.lwjgl.system.Pointer

public class VkShaderStatisticsInfoAMD extends org.lwjgl.system.Struct<VkShaderStatisticsInfoAMD>
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

Layout


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

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • SHADERSTAGEMASK

      public static final int SHADERSTAGEMASK
      The struct member offsets.
    • RESOURCEUSAGE

      public static final int RESOURCEUSAGE
      The struct member offsets.
    • NUMPHYSICALVGPRS

      public static final int NUMPHYSICALVGPRS
      The struct member offsets.
    • NUMPHYSICALSGPRS

      public static final int NUMPHYSICALSGPRS
      The struct member offsets.
    • NUMAVAILABLEVGPRS

      public static final int NUMAVAILABLEVGPRS
      The struct member offsets.
    • NUMAVAILABLESGPRS

      public static final int NUMAVAILABLESGPRS
      The struct member offsets.
    • COMPUTEWORKGROUPSIZE

      public static final int COMPUTEWORKGROUPSIZE
      The struct member offsets.
  • Constructor Details

    • VkShaderStatisticsInfoAMD

      public VkShaderStatisticsInfoAMD(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 Details

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<VkShaderStatisticsInfoAMD>
    • shaderStageMask

      public int shaderStageMask()
      are the combination of logical shader stages contained within this shader.
    • resourceUsage

      public VkShaderResourceUsageAMD resourceUsage()
      a VkShaderResourceUsageAMD structure describing internal physical device resources used by this shader.
    • numPhysicalVgprs

      public int numPhysicalVgprs()
      the maximum number of vector instruction general-purpose registers (VGPRs) available to the physical device.
    • numPhysicalSgprs

      public int numPhysicalSgprs()
      the maximum number of scalar instruction general-purpose registers (SGPRs) available to the physical device.
    • numAvailableVgprs

      public int numAvailableVgprs()
      the maximum limit of VGPRs made available to the shader compiler.
    • numAvailableSgprs

      public int numAvailableSgprs()
      the maximum limit of SGPRs made available to the shader compiler.
    • computeWorkGroupSize

      public IntBuffer computeWorkGroupSize()
      the local workgroup size of this shader in { X, Y, Z } dimensions.
    • computeWorkGroupSize

      public int computeWorkGroupSize(int index)
      the local workgroup size of this shader in { X, Y, Z } dimensions.
    • create

      public static VkShaderStatisticsInfoAMD create(long address)
      Returns a new VkShaderStatisticsInfoAMD instance for the specified memory address.
    • createSafe

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

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

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

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

      public static VkShaderResourceUsageAMD nresourceUsage(long struct)
      Unsafe version of resourceUsage().
    • 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 IntBuffer ncomputeWorkGroupSize(long struct)
      Unsafe version of computeWorkGroupSize().
    • ncomputeWorkGroupSize

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