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
pCodepoints 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
pCodepoints 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
pCodepoints 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 as optional: in the SPIR-V Environment appendix, the corresponding feature(s) must be enabled.
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_SHADER_MODULE_CREATE_INFOpNextmust beNULLor a pointer to a valid instance ofVkShaderModuleValidationCacheCreateInfoEXTflagsmust be a valid combination ofVkShaderModuleCreateFlagBitsvaluespCodemust be a valid pointer to an array ofcodeSize / 4uint32_tvalues
See Also
Member documentation
sType– the type of this structure.pNext–NULLor a pointer to an extension-specific structure.flags– reserved for future use.codeSize– the size, in bytes, of the code pointed to bypCode.pCode– points to code that is used to create the shader module
Layout
struct VkShaderModuleCreateInfo { VkStructureType sType; void const * pNext; VkShaderModuleCreateFlags flags; size_t codeSize; 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 Modifier and Type Method Description static VkShaderModuleCreateInfocalloc()Returns a newVkShaderModuleCreateInfoinstance allocated withmemCalloc.static VkShaderModuleCreateInfo.Buffercalloc(int capacity)Returns a newVkShaderModuleCreateInfo.Bufferinstance allocated withmemCalloc.static VkShaderModuleCreateInfocallocStack()Returns a newVkShaderModuleCreateInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkShaderModuleCreateInfo.BuffercallocStack(int capacity)Returns a newVkShaderModuleCreateInfo.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkShaderModuleCreateInfo.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkShaderModuleCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkShaderModuleCreateInfocallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkShaderModuleCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.longcodeSize()Returns the value of thecodeSizefield.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()Returns the value of theflagsfield.VkShaderModuleCreateInfoflags(int value)Sets the specified value to theflagsfield.static VkShaderModuleCreateInfomalloc()Returns a newVkShaderModuleCreateInfoinstance allocated withmemAlloc.static VkShaderModuleCreateInfo.Buffermalloc(int capacity)Returns a newVkShaderModuleCreateInfo.Bufferinstance allocated withmemAlloc.static VkShaderModuleCreateInfomallocStack()Returns a newVkShaderModuleCreateInfoinstance allocated on the thread-localMemoryStack.static VkShaderModuleCreateInfo.BuffermallocStack(int capacity)Returns a newVkShaderModuleCreateInfo.Bufferinstance allocated on the thread-localMemoryStack.static VkShaderModuleCreateInfo.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkShaderModuleCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.static VkShaderModuleCreateInfomallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkShaderModuleCreateInfoinstance allocated on the specifiedMemoryStack.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()Returns aByteBufferview of the data pointed to by thepCodefield.VkShaderModuleCreateInfopCode(java.nio.ByteBuffer value)Sets the address of the specifiedByteBufferto thepCodefield.longpNext()Returns the value of thepNextfield.VkShaderModuleCreateInfopNext(long value)Sets the specified value to thepNextfield.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()Returns the value of thesTypefield.VkShaderModuleCreateInfosType(int value)Sets the specified value to thesTypefield.static voidvalidate(long struct)Validates pointer members that should not beNULL.static voidvalidate(long array, int count)Callsvalidate(long)for each struct contained in the specified struct array.
-
-
-
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()
Returns the value of thesTypefield.
-
pNext
public long pNext()
Returns the value of thepNextfield.
-
flags
public int flags()
Returns the value of theflagsfield.
-
codeSize
public long codeSize()
Returns the value of thecodeSizefield.
-
pCode
public java.nio.ByteBuffer pCode()
Returns aByteBufferview of the data pointed to by thepCodefield.
-
sType
public VkShaderModuleCreateInfo sType(int value)
Sets the specified value to thesTypefield.
-
pNext
public VkShaderModuleCreateInfo pNext(long value)
Sets the specified value to thepNextfield.
-
flags
public VkShaderModuleCreateInfo flags(int value)
Sets the specified value to theflagsfield.
-
pCode
public VkShaderModuleCreateInfo pCode(java.nio.ByteBuffer value)
Sets the address of the specifiedByteBufferto thepCodefield.
-
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
public static VkShaderModuleCreateInfo mallocStack()
Returns a newVkShaderModuleCreateInfoinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkShaderModuleCreateInfo callocStack()
Returns a newVkShaderModuleCreateInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkShaderModuleCreateInfo mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkShaderModuleCreateInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkShaderModuleCreateInfo callocStack(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
-
mallocStack
public static VkShaderModuleCreateInfo.Buffer mallocStack(int capacity)
Returns a newVkShaderModuleCreateInfo.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkShaderModuleCreateInfo.Buffer callocStack(int capacity)
Returns a newVkShaderModuleCreateInfo.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkShaderModuleCreateInfo.Buffer mallocStack(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
-
callocStack
public static VkShaderModuleCreateInfo.Buffer callocStack(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
-
validate
public static void validate(long array, int count)Callsvalidate(long)for each struct contained in the specified struct array.- Parameters:
array- the struct array to validatecount- the number of structs inarray
-
-