Class VkPhysicalDeviceSubgroupProperties
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
Description
If the VkPhysicalDeviceSubgroupProperties structure is included in the pNext chain of the VkPhysicalDeviceProperties2 structure passed to GetPhysicalDeviceProperties2, it is filled in with each corresponding implementation-dependent property.
If supportedOperations includes SUBGROUP_FEATURE_QUAD_BIT, or the shaderSubgroupUniformControlFlow feature is enabled, subgroupSize must be greater than or equal to 4.
If the shaderQuadControl feature is supported, supportedOperations must include SUBGROUP_FEATURE_QUAD_BIT.
If VK_KHR_shader_subgroup_rotate is supported, and the implementation advertises support with a VkExtensionProperties::specVersion greater than or equal to 2, and the shaderSubgroupRotate feature is supported, SUBGROUP_FEATURE_ROTATE_BIT must be returned in VkPhysicalDeviceVulkan11Properties::subgroupSupportedOperations and VkPhysicalDeviceSubgroupProperties::supportedOperations. If VK_KHR_shader_subgroup_rotate is supported, and the implementation advertises support with a VkExtensionProperties::specVersion greater than or equal to 2, and the shaderSubgroupRotateClustered feature is supported, SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT must be returned in VkPhysicalDeviceVulkan11Properties::subgroupSupportedOperations and VkPhysicalDeviceSubgroupProperties::supportedOperations.
Note
SUBGROUP_FEATURE_ROTATE_BIT and SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT were added in version 2 of the VK_KHR_shader_subgroup_rotate extension, after the initial release, so there are implementations that do not advertise these bits. Applications should use the shaderSubgroupRotate and shaderSubgroupRotateClustered features to determine and enable support. These bits are advertised here for consistency and for future dependencies.
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES
Layout
struct VkPhysicalDeviceSubgroupProperties {
VkStructureType sType();
void * pNext();
uint32_t subgroupSize();
VkShaderStageFlags supportedStages();
VkSubgroupFeatureFlags supportedOperations();
VkBool32 quadOperationsInAllStages();
}-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn array ofVkPhysicalDeviceSubgroupPropertiesstructs.Nested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionVkPhysicalDeviceSubgroupProperties(ByteBuffer container) Creates aVkPhysicalDeviceSubgroupPropertiesinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptioncalloc()Returns a newVkPhysicalDeviceSubgroupPropertiesinstance allocated withmemCalloc.calloc(int capacity) Returns a newVkPhysicalDeviceSubgroupProperties.Bufferinstance allocated withmemCalloc.calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkPhysicalDeviceSubgroupProperties.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.calloc(org.lwjgl.system.MemoryStack stack) Returns a newVkPhysicalDeviceSubgroupPropertiesinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.Deprecated.callocStack(int capacity) Deprecated.callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.callocStack(org.lwjgl.system.MemoryStack stack) Deprecated.create()Returns a newVkPhysicalDeviceSubgroupPropertiesinstance allocated withBufferUtils.create(int capacity) Returns a newVkPhysicalDeviceSubgroupProperties.Bufferinstance allocated withBufferUtils.create(long address) Returns a newVkPhysicalDeviceSubgroupPropertiesinstance for the specified memory address.create(long address, int capacity) Create aVkPhysicalDeviceSubgroupProperties.Bufferinstance at the specified memory.static @Nullable VkPhysicalDeviceSubgroupPropertiescreateSafe(long address) static @Nullable VkPhysicalDeviceSubgroupProperties.BuffercreateSafe(long address, int capacity) malloc()Returns a newVkPhysicalDeviceSubgroupPropertiesinstance allocated withmemAlloc.malloc(int capacity) Returns a newVkPhysicalDeviceSubgroupProperties.Bufferinstance allocated withmemAlloc.malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkPhysicalDeviceSubgroupProperties.Bufferinstance allocated on the specifiedMemoryStack.malloc(org.lwjgl.system.MemoryStack stack) Returns a newVkPhysicalDeviceSubgroupPropertiesinstance allocated on the specifiedMemoryStack.Deprecated.mallocStack(int capacity) Deprecated.mallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.mallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static longnpNext(long struct) Unsafe version ofpNext().static voidnpNext(long struct, long value) Unsafe version ofpNext.static intnquadOperationsInAllStages(long struct) Unsafe version ofquadOperationsInAllStages().static intnsType(long struct) Unsafe version ofsType().static voidnsType(long struct, int value) Unsafe version ofsType.static intnsubgroupSize(long struct) Unsafe version ofsubgroupSize().static intnsupportedOperations(long struct) Unsafe version ofsupportedOperations().static intnsupportedStages(long struct) Unsafe version ofsupportedStages().longpNext()NULLor a pointer to a structure extending this structure.pNext(long value) Sets the specified value to thepNext()field.booleana boolean specifying whether quad group operations are available in all stages, or are restricted to fragment and compute stages.set(int sType, long pNext) Initializes this struct with the specified values.Copies the specified struct data to this struct.intsizeof()intsType()aVkStructureTypevalue identifying this structure.sType(int value) Sets the specified value to thesType()field.Sets theSTRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIESvalue to thesType()field.intthe default number of invocations in each subgroup.inta bitmask ofVkSubgroupFeatureFlagBitsspecifying the sets of group operations with subgroup scope supported on this device.inta bitfield ofVkShaderStageFlagBitsdescribing the shader stages that group operations with subgroup scope are supported in.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
STYPE
public static final int STYPEThe struct member offsets. -
PNEXT
public static final int PNEXTThe struct member offsets. -
SUBGROUPSIZE
public static final int SUBGROUPSIZEThe struct member offsets. -
SUPPORTEDSTAGES
public static final int SUPPORTEDSTAGESThe struct member offsets. -
SUPPORTEDOPERATIONS
public static final int SUPPORTEDOPERATIONSThe struct member offsets. -
QUADOPERATIONSINALLSTAGES
public static final int QUADOPERATIONSINALLSTAGESThe struct member offsets.
-
-
Constructor Details
-
VkPhysicalDeviceSubgroupProperties
Creates aVkPhysicalDeviceSubgroupPropertiesinstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin classorg.lwjgl.system.Struct<VkPhysicalDeviceSubgroupProperties>
-
sType
public int sType()aVkStructureTypevalue identifying this structure. -
pNext
public long pNext()NULLor a pointer to a structure extending this structure. -
subgroupSize
public int subgroupSize()the default number of invocations in each subgroup.subgroupSizeis at least 1 if any of the physical device’s queues supportQUEUE_GRAPHICS_BITorQUEUE_COMPUTE_BIT.subgroupSizeis a power-of-two. -
supportedStages
public int supportedStages()a bitfield ofVkShaderStageFlagBitsdescribing the shader stages that group operations with subgroup scope are supported in.supportedStageswill have theSHADER_STAGE_COMPUTE_BITbit set if any of the physical device’s queues supportQUEUE_COMPUTE_BIT. -
supportedOperations
public int supportedOperations()a bitmask ofVkSubgroupFeatureFlagBitsspecifying the sets of group operations with subgroup scope supported on this device.supportedOperationswill have theSUBGROUP_FEATURE_BASIC_BITbit set if any of the physical device’s queues supportQUEUE_GRAPHICS_BITorQUEUE_COMPUTE_BIT. -
quadOperationsInAllStages
public boolean quadOperationsInAllStages()a boolean specifying whether quad group operations are available in all stages, or are restricted to fragment and compute stages. -
sType
Sets the specified value to thesType()field. -
sType$Default
Sets theSTRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIESvalue to thesType()field. -
pNext
Sets the specified value to thepNext()field. -
set
Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newVkPhysicalDeviceSubgroupPropertiesinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkPhysicalDeviceSubgroupPropertiesinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkPhysicalDeviceSubgroupPropertiesinstance allocated withBufferUtils. -
create
Returns a newVkPhysicalDeviceSubgroupPropertiesinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVkPhysicalDeviceSubgroupProperties.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkPhysicalDeviceSubgroupProperties.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVkPhysicalDeviceSubgroupProperties.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVkPhysicalDeviceSubgroupProperties.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
public static @Nullable VkPhysicalDeviceSubgroupProperties.Buffer createSafe(long address, int capacity) -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
@Deprecated public static VkPhysicalDeviceSubgroupProperties mallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
@Deprecated public static VkPhysicalDeviceSubgroupProperties callocStack(org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
mallocStack
@Deprecated public static VkPhysicalDeviceSubgroupProperties.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
@Deprecated public static VkPhysicalDeviceSubgroupProperties.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
malloc
Returns a newVkPhysicalDeviceSubgroupPropertiesinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newVkPhysicalDeviceSubgroupPropertiesinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkPhysicalDeviceSubgroupProperties.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkPhysicalDeviceSubgroupProperties.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
public static VkPhysicalDeviceSubgroupProperties.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkPhysicalDeviceSubgroupProperties.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nsType
public static int nsType(long struct) Unsafe version ofsType(). -
npNext
public static long npNext(long struct) Unsafe version ofpNext(). -
nsubgroupSize
public static int nsubgroupSize(long struct) Unsafe version ofsubgroupSize(). -
nsupportedStages
public static int nsupportedStages(long struct) Unsafe version ofsupportedStages(). -
nsupportedOperations
public static int nsupportedOperations(long struct) Unsafe version ofsupportedOperations(). -
nquadOperationsInAllStages
public static int nquadOperationsInAllStages(long struct) Unsafe version ofquadOperationsInAllStages(). -
nsType
public static void nsType(long struct, int value) Unsafe version ofsType. -
npNext
public static void npNext(long struct, long value) Unsafe version ofpNext.
-