Top Description Inners Fields Constructors Methods
org.lwjgl.vulkan

public Class VkShaderStatisticsInfoAMD

extends Struct<VkShaderStatisticsInfoAMD>
Class Inheritance
Imports
javax.annotation.*, java.nio.*, org.lwjgl.system.*

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];
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
COMPUTEWORKGROUPSIZE

The struct member offsets.

public static final int
NUMAVAILABLESGPRS

The struct member offsets.

public static final int
NUMAVAILABLEVGPRS

The struct member offsets.

public static final int
NUMPHYSICALSGPRS

The struct member offsets.

public static final int
NUMPHYSICALVGPRS

The struct member offsets.

public static final int
RESOURCEUSAGE

The struct member offsets.

public static final int
SHADERSTAGEMASK

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
VkShaderStatisticsInfoAMD(long address, ByteBuffer container)

public
VkShaderStatisticsInfoAMD(ByteBuffer container)

Creates a VkShaderStatisticsInfoAMD instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public IntBuffer
computeWorkGroupSize()

the local workgroup size of this shader in { X, Y, Z } dimensions.

public int
computeWorkGroupSize(int index)

the local workgroup size of this shader in { X, Y, Z } dimensions.

protected VkShaderStatisticsInfoAMD
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static VkShaderStatisticsInfoAMD
create(long address)

Returns a new VkShaderStatisticsInfoAMD instance for the specified memory address.

public static VkShaderStatisticsInfoAMD.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a VkShaderStatisticsInfoAMD.Buffer instance at the specified memory.

public static VkShaderStatisticsInfoAMD
createSafe(long address)

Like create, but returns null if address is NULL.

public static VkShaderStatisticsInfoAMD.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public static IntBuffer
ncomputeWorkGroupSize(long struct)

Unsafe version of computeWorkGroupSize.

public static int
ncomputeWorkGroupSize(long struct, int index)

Unsafe version of computeWorkGroupSize.

public static int
nnumAvailableSgprs(long struct)

Unsafe version of numAvailableSgprs.

public static int
nnumAvailableVgprs(long struct)

Unsafe version of numAvailableVgprs.

public static int
nnumPhysicalSgprs(long struct)

Unsafe version of numPhysicalSgprs.

public static int
nnumPhysicalVgprs(long struct)

Unsafe version of numPhysicalVgprs.

public static VkShaderResourceUsageAMD
nresourceUsage(long struct)

Unsafe version of resourceUsage.

public static int
nshaderStageMask(long struct)

Unsafe version of shaderStageMask.

public int
numAvailableSgprs()

the maximum limit of SGPRs made available to the shader compiler.

public int
numAvailableVgprs()

the maximum limit of VGPRs made available to the shader compiler.

public int
numPhysicalSgprs()

the maximum number of scalar instruction general-purpose registers (SGPRs) available to the physical device.

public int
numPhysicalVgprs()

the maximum number of vector instruction general-purpose registers (VGPRs) available to the physical device.

public VkShaderResourceUsageAMD
resourceUsage()

a VkShaderResourceUsageAMD structure describing internal physical device resources used by this shader.

public int
shaderStageMask()

are the combination of logical shader stages contained within this shader.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

COMPUTEWORKGROUPSIZEback to summary
public static final int COMPUTEWORKGROUPSIZE

The struct member offsets.

NUMAVAILABLESGPRSback to summary
public static final int NUMAVAILABLESGPRS

The struct member offsets.

NUMAVAILABLEVGPRSback to summary
public static final int NUMAVAILABLEVGPRS

The struct member offsets.

NUMPHYSICALSGPRSback to summary
public static final int NUMPHYSICALSGPRS

The struct member offsets.

NUMPHYSICALVGPRSback to summary
public static final int NUMPHYSICALVGPRS

The struct member offsets.

RESOURCEUSAGEback to summary
public static final int RESOURCEUSAGE

The struct member offsets.

SHADERSTAGEMASKback to summary
public static final int SHADERSTAGEMASK

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

Constructor Detail

VkShaderStatisticsInfoAMDback to summary
protected VkShaderStatisticsInfoAMD(long address, ByteBuffer container)
VkShaderStatisticsInfoAMDback to summary
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 Detail

computeWorkGroupSizeback to summary
public IntBuffer computeWorkGroupSize()

the local workgroup size of this shader in { X, Y, Z } dimensions.

Annotations
@NativeType:uint32_t[3]
computeWorkGroupSizeback to summary
public int computeWorkGroupSize(int index)

the local workgroup size of this shader in { X, Y, Z } dimensions.

Annotations
@NativeType:uint32_t
createback to summary
protected VkShaderStatisticsInfoAMD create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static VkShaderStatisticsInfoAMD create(long address)

Returns a new VkShaderStatisticsInfoAMD instance for the specified memory address.

createback to summary
public static VkShaderStatisticsInfoAMD.Buffer create(long address, int capacity)

Create a VkShaderStatisticsInfoAMD.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static VkShaderStatisticsInfoAMD createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
createSafeback to summary
public static VkShaderStatisticsInfoAMD.Buffer createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

Annotations
@Nullable
ncomputeWorkGroupSizeback to summary
public static IntBuffer ncomputeWorkGroupSize(long struct)

Unsafe version of computeWorkGroupSize.

ncomputeWorkGroupSizeback to summary
public static int ncomputeWorkGroupSize(long struct, int index)

Unsafe version of computeWorkGroupSize.

nnumAvailableSgprsback to summary
public static int nnumAvailableSgprs(long struct)

Unsafe version of numAvailableSgprs.

nnumAvailableVgprsback to summary
public static int nnumAvailableVgprs(long struct)

Unsafe version of numAvailableVgprs.

nnumPhysicalSgprsback to summary
public static int nnumPhysicalSgprs(long struct)

Unsafe version of numPhysicalSgprs.

nnumPhysicalVgprsback to summary
public static int nnumPhysicalVgprs(long struct)

Unsafe version of numPhysicalVgprs.

nresourceUsageback to summary
public static VkShaderResourceUsageAMD nresourceUsage(long struct)

Unsafe version of resourceUsage.

nshaderStageMaskback to summary
public static int nshaderStageMask(long struct)

Unsafe version of shaderStageMask.

numAvailableSgprsback to summary
public int numAvailableSgprs()

the maximum limit of SGPRs made available to the shader compiler.

Annotations
@NativeType:uint32_t
numAvailableVgprsback to summary
public int numAvailableVgprs()

the maximum limit of VGPRs made available to the shader compiler.

Annotations
@NativeType:uint32_t
numPhysicalSgprsback to summary
public int numPhysicalSgprs()

the maximum number of scalar instruction general-purpose registers (SGPRs) available to the physical device.

Annotations
@NativeType:uint32_t
numPhysicalVgprsback to summary
public int numPhysicalVgprs()

the maximum number of vector instruction general-purpose registers (VGPRs) available to the physical device.

Annotations
@NativeType:uint32_t
resourceUsageback to summary
public VkShaderResourceUsageAMD resourceUsage()

a VkShaderResourceUsageAMD structure describing internal physical device resources used by this shader.

shaderStageMaskback to summary
public int shaderStageMask()

are the combination of logical shader stages contained within this shader.

Annotations
@NativeType:VkShaderStageFlags
sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
org.lwjgl.vulkan back to summary

public Class VkShaderStatisticsInfoAMD.Buffer

extends StructBuffer<VkShaderStatisticsInfoAMD, VkShaderStatisticsInfoAMD.Buffer>
Class Inheritance

An array of VkShaderStatisticsInfoAMD structs.

Field Summary

Modifier and TypeField and Description
private static final VkShaderStatisticsInfoAMD

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new VkShaderStatisticsInfoAMD.Buffer instance backed by the specified container.

public
Buffer(long address, int cap)

pack-priv
Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Summary

Modifier and TypeMethod and Description
public IntBuffer
public int

Returns:

the value at the specified index of the VkShaderStatisticsInfoAMD#computeWorkGroupSize field.
computeWorkGroupSize
(int index)

protected VkShaderStatisticsInfoAMD
public int
public int
public int
public int
public VkShaderResourceUsageAMD
protected VkShaderStatisticsInfoAMD.Buffer
public int
Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final VkShaderStatisticsInfoAMD ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new VkShaderStatisticsInfoAMD.Buffer instance backed by the specified container.

Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by VkShaderStatisticsInfoAMD#SIZEOF, and its mark will be undefined.

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

Bufferback to summary
public Buffer(long address, int cap)
Bufferback to summary
pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Detail

computeWorkGroupSizeback to summary
public IntBuffer computeWorkGroupSize()
Returns:IntBuffer

a IntBuffer view of the VkShaderStatisticsInfoAMD#computeWorkGroupSize field.

Annotations
@NativeType:uint32_t[3]
computeWorkGroupSizeback to summary
public int computeWorkGroupSize(int index)
Returns:int

the value at the specified index of the VkShaderStatisticsInfoAMD#computeWorkGroupSize field.

Annotations
@NativeType:uint32_t
getElementFactoryback to summary
protected VkShaderStatisticsInfoAMD getElementFactory()

Implements abstract org.lwjgl.system.StructBuffer.getElementFactory.

Annotations
@Override
numAvailableSgprsback to summary
public int numAvailableSgprs()
Returns:int

the value of the VkShaderStatisticsInfoAMD#numAvailableSgprs field.

Annotations
@NativeType:uint32_t
numAvailableVgprsback to summary
public int numAvailableVgprs()
Returns:int

the value of the VkShaderStatisticsInfoAMD#numAvailableVgprs field.

Annotations
@NativeType:uint32_t
numPhysicalSgprsback to summary
public int numPhysicalSgprs()
Returns:int

the value of the VkShaderStatisticsInfoAMD#numPhysicalSgprs field.

Annotations
@NativeType:uint32_t
numPhysicalVgprsback to summary
public int numPhysicalVgprs()
Returns:int

the value of the VkShaderStatisticsInfoAMD#numPhysicalVgprs field.

Annotations
@NativeType:uint32_t
resourceUsageback to summary
public VkShaderResourceUsageAMD resourceUsage()
Returns:VkShaderResourceUsageAMD

a VkShaderResourceUsageAMD view of the VkShaderStatisticsInfoAMD#resourceUsage field.

selfback to summary
protected VkShaderStatisticsInfoAMD.Buffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override
shaderStageMaskback to summary
public int shaderStageMask()
Returns:int

the value of the VkShaderStatisticsInfoAMD#shaderStageMask field.

Annotations
@NativeType:VkShaderStageFlags