Package org.lwjgl.vulkan
Class VkShaderModuleCreateInfo
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkShaderModuleCreateInfo
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkShaderModuleCreateInfo extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure specifying parameters of a newly created shader module.Valid Usage
codeSizemust be greater than 0- If
pCodeis a pointer to SPIR-V code,codeSizemust be a multiple of 4 pCodemust point to either valid SPIR-V code, formatted and packed as described by the Khronos SPIR-V Specification or valid GLSL code which must be written to theGL_KHR_vulkan_glslextension specification- If
pCodeis a pointer to SPIR-V code, that code must adhere to the validation rules described by the Validation Rules within a Module section of the SPIR-V Environment appendix - If
pCodeis a pointer to GLSL code, it must be valid GLSL code written to theGL_KHR_vulkan_glslGLSL extension specification pCodemust declare theShadercapability for SPIR-V codepCodemust not declare any capability that is not supported by the API, as described by the Capabilities section of the SPIR-V Environment appendix- If
pCodedeclares any of the capabilities listed in the SPIR-V Environment appendix, one of the corresponding requirements must be satisfied pCodemust not declare any SPIR-V extension that is not supported by the API, as described by the Extension section of the SPIR-V Environment appendix- If
pCodedeclares any of the SPIR-V extensions listed in the SPIR-V Environment appendix, one of the corresponding requirements must be satisfied
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_SHADER_MODULE_CREATE_INFOpNextmust beNULLor a pointer to a valid instance ofVkShaderModuleValidationCacheCreateInfoEXT- The
sTypevalue of each struct in thepNextchain must be unique flagsmust be 0pCodemust be a valid pointer to an array ofcodeSize / 4uint32_tvalues
See Also
Layout
struct VkShaderModuleCreateInfo { VkStructureTypesType(); void const *pNext(); VkShaderModuleCreateFlagsflags(); size_tcodeSize(); uint32_t const *pCode(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkShaderModuleCreateInfo.BufferAn array ofVkShaderModuleCreateInfostructs.
-
Constructor Summary
Constructors Constructor Description VkShaderModuleCreateInfo(java.nio.ByteBuffer container)Creates aVkShaderModuleCreateInfoinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static VkShaderModuleCreateInfocalloc()Returns a newVkShaderModuleCreateInfoinstance allocated withmemCalloc.static VkShaderModuleCreateInfo.Buffercalloc(int capacity)Returns a newVkShaderModuleCreateInfo.Bufferinstance allocated withmemCalloc.static VkShaderModuleCreateInfo.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkShaderModuleCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkShaderModuleCreateInfocalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkShaderModuleCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkShaderModuleCreateInfocallocStack()Deprecated.static VkShaderModuleCreateInfo.BuffercallocStack(int capacity)Deprecated.static VkShaderModuleCreateInfo.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkShaderModuleCreateInfocallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.longcodeSize()the size, in bytes, of the code pointed to bypCode.static VkShaderModuleCreateInfocreate()Returns a newVkShaderModuleCreateInfoinstance allocated withBufferUtils.static VkShaderModuleCreateInfo.Buffercreate(int capacity)Returns a newVkShaderModuleCreateInfo.Bufferinstance allocated withBufferUtils.static VkShaderModuleCreateInfocreate(long address)Returns a newVkShaderModuleCreateInfoinstance for the specified memory address.static VkShaderModuleCreateInfo.Buffercreate(long address, int capacity)Create aVkShaderModuleCreateInfo.Bufferinstance at the specified memory.static VkShaderModuleCreateInfocreateSafe(long address)static VkShaderModuleCreateInfo.BuffercreateSafe(long address, int capacity)intflags()reserved for future use.VkShaderModuleCreateInfoflags(int value)Sets the specified value to theflags()field.static VkShaderModuleCreateInfomalloc()Returns a newVkShaderModuleCreateInfoinstance allocated withmemAlloc.static VkShaderModuleCreateInfo.Buffermalloc(int capacity)Returns a newVkShaderModuleCreateInfo.Bufferinstance allocated withmemAlloc.static VkShaderModuleCreateInfo.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkShaderModuleCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.static VkShaderModuleCreateInfomalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkShaderModuleCreateInfoinstance allocated on the specifiedMemoryStack.static VkShaderModuleCreateInfomallocStack()Deprecated.static VkShaderModuleCreateInfo.BuffermallocStack(int capacity)Deprecated.static VkShaderModuleCreateInfo.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkShaderModuleCreateInfomallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static longncodeSize(long struct)Unsafe version ofcodeSize().static voidncodeSize(long struct, long value)Sets the specified value to thecodeSizefield of the specifiedstruct.static intnflags(long struct)Unsafe version offlags().static voidnflags(long struct, int value)Unsafe version offlags.static java.nio.ByteBuffernpCode(long struct)Unsafe version ofpCode.static voidnpCode(long struct, java.nio.ByteBuffer value)Unsafe version ofpCode.static longnpNext(long struct)Unsafe version ofpNext().static voidnpNext(long struct, long value)Unsafe version ofpNext.static intnsType(long struct)Unsafe version ofsType().static voidnsType(long struct, int value)Unsafe version ofsType.java.nio.ByteBufferpCode()points to code that is used to create the shader moduleVkShaderModuleCreateInfopCode(java.nio.ByteBuffer value)Sets the address of the specifiedByteBufferto thepCode()field.longpNext()NULLor a pointer to a structure extending this structure.VkShaderModuleCreateInfopNext(long value)Sets the specified value to thepNext()field.VkShaderModuleCreateInfopNext(VkShaderModuleValidationCacheCreateInfoEXT value)Prepends the specifiedVkShaderModuleValidationCacheCreateInfoEXTvalue to thepNextchain.VkShaderModuleCreateInfoset(int sType, long pNext, int flags, java.nio.ByteBuffer pCode)Initializes this struct with the specified values.VkShaderModuleCreateInfoset(VkShaderModuleCreateInfo src)Copies the specified struct data to this struct.intsizeof()intsType()the type of this structure.VkShaderModuleCreateInfosType(int value)Sets the specified value to thesType()field.VkShaderModuleCreateInfosType$Default()Sets theSTRUCTURE_TYPE_SHADER_MODULE_CREATE_INFOvalue to thesType()field.static voidvalidate(long struct)Validates pointer members that should not beNULL.
-
-
-
Constructor Detail
-
VkShaderModuleCreateInfo
public VkShaderModuleCreateInfo(java.nio.ByteBuffer container)
Creates aVkShaderModuleCreateInfoinstance 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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
sType
public int sType()
the type of this structure.
-
pNext
public long pNext()
NULLor a pointer to a structure extending this structure.
-
flags
public int flags()
reserved for future use.
-
codeSize
public long codeSize()
the size, in bytes, of the code pointed to bypCode.
-
pCode
public java.nio.ByteBuffer pCode()
points to code that is used to create the shader module
-
sType
public VkShaderModuleCreateInfo sType(int value)
Sets the specified value to thesType()field.
-
sType$Default
public VkShaderModuleCreateInfo sType$Default()
Sets theSTRUCTURE_TYPE_SHADER_MODULE_CREATE_INFOvalue to thesType()field.
-
pNext
public VkShaderModuleCreateInfo pNext(long value)
Sets the specified value to thepNext()field.
-
pNext
public VkShaderModuleCreateInfo pNext(VkShaderModuleValidationCacheCreateInfoEXT value)
Prepends the specifiedVkShaderModuleValidationCacheCreateInfoEXTvalue to thepNextchain.
-
flags
public VkShaderModuleCreateInfo flags(int value)
Sets the specified value to theflags()field.
-
pCode
public VkShaderModuleCreateInfo pCode(java.nio.ByteBuffer value)
Sets the address of the specifiedByteBufferto thepCode()field.
-
set
public VkShaderModuleCreateInfo set(int sType, long pNext, int flags, java.nio.ByteBuffer pCode)
Initializes this struct with the specified values.
-
set
public VkShaderModuleCreateInfo set(VkShaderModuleCreateInfo src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkShaderModuleCreateInfo malloc()
Returns a newVkShaderModuleCreateInfoinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkShaderModuleCreateInfo calloc()
Returns a newVkShaderModuleCreateInfoinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkShaderModuleCreateInfo create()
Returns a newVkShaderModuleCreateInfoinstance allocated withBufferUtils.
-
create
public static VkShaderModuleCreateInfo create(long address)
Returns a newVkShaderModuleCreateInfoinstance for the specified memory address.
-
createSafe
@Nullable public static VkShaderModuleCreateInfo createSafe(long address)
-
malloc
public static VkShaderModuleCreateInfo.Buffer malloc(int capacity)
Returns a newVkShaderModuleCreateInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkShaderModuleCreateInfo.Buffer calloc(int capacity)
Returns a newVkShaderModuleCreateInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkShaderModuleCreateInfo.Buffer create(int capacity)
Returns a newVkShaderModuleCreateInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkShaderModuleCreateInfo.Buffer create(long address, int capacity)
Create aVkShaderModuleCreateInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkShaderModuleCreateInfo.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static VkShaderModuleCreateInfo mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkShaderModuleCreateInfo callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkShaderModuleCreateInfo mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkShaderModuleCreateInfo callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkShaderModuleCreateInfo.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkShaderModuleCreateInfo.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static VkShaderModuleCreateInfo.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 VkShaderModuleCreateInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static VkShaderModuleCreateInfo malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkShaderModuleCreateInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkShaderModuleCreateInfo calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkShaderModuleCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkShaderModuleCreateInfo.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkShaderModuleCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VkShaderModuleCreateInfo.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkShaderModuleCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nsType
public static int nsType(long struct)
Unsafe version ofsType().
-
npNext
public static long npNext(long struct)
Unsafe version ofpNext().
-
nflags
public static int nflags(long struct)
Unsafe version offlags().
-
ncodeSize
public static long ncodeSize(long struct)
Unsafe version ofcodeSize().
-
npCode
public static java.nio.ByteBuffer npCode(long struct)
Unsafe version ofpCode.
-
nsType
public static void nsType(long struct, int value)Unsafe version ofsType.
-
npNext
public static void npNext(long struct, long value)Unsafe version ofpNext.
-
nflags
public static void nflags(long struct, int value)Unsafe version offlags.
-
ncodeSize
public static void ncodeSize(long struct, long value)Sets the specified value to thecodeSizefield of the specifiedstruct.
-
npCode
public static void npCode(long struct, java.nio.ByteBuffer value)Unsafe version ofpCode.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
-