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, NativeResource, Pointer
public class VkShaderModuleCreateInfo extends Struct
Khronos Reference Page
Vulkan SpecificationContains information about how a shader module should be created.
Valid Usage
sTypemust beSTRUCTURE_TYPE_SHADER_MODULE_CREATE_INFOpNextmust beNULLflagsmust be 0pCodemust be a pointer to an array ofcodeSize / 4uint32_tvaluescodeSizemust be greater than 0codeSizemust be a multiple of 4pCodemust point to valid SPIR-V code, formatted and packed as described by https://www.khronos.org/registry/spir-v/specs/1.0/SPIRV.html[the SPIR-V Specification v1.0]pCodemust adhere to the validation rules described by the Validation Rules within a Module section of the SPIR-V Environment appendixpCodemust declare theShadercapabilitypCodemust 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 that are listed as not required by the implementation, the relevant feature must be enabled, as listed in the SPIR-V Environment appendix
Member documentation
sType– the type of this structure. Must be:STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFOpNext– reserved for use by extensionsflags– reserved for future usecodeSize– the size, in bytes, of the code pointed to bypCodepCode– points to code that is used to create the shader module
Layout
struct VkShaderModuleCreateInfo { VkStructureType sType; const void * pNext; VkShaderModuleCreateFlags flags; size_t codeSize; const uint32_t * pCode; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classVkShaderModuleCreateInfo.BufferAn array ofVkShaderModuleCreateInfostructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and 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 and 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, MemoryStack stack)Returns a newVkShaderModuleCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkShaderModuleCreateInfocallocStack(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 ornullif the address isNULL.static VkShaderModuleCreateInfo.Buffercreate(long address, int capacity)Create aVkShaderModuleCreateInfo.Bufferinstance at the specified memory.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, MemoryStack stack)Returns a newVkShaderModuleCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.static VkShaderModuleCreateInfomallocStack(MemoryStack stack)Returns a newVkShaderModuleCreateInfoinstance allocated on the specifiedMemoryStack.VkShaderModuleCreateInfonset(long struct)Unsafe version ofset.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()Returns thesizeof(struct).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)CallsVkShaderModuleCreateInfo.validate(long)for each struct contained in the specified struct array.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
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()
Description copied from class:StructReturns thesizeof(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.
-
nset
public VkShaderModuleCreateInfo nset(long struct)
Unsafe version ofset.
-
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 ornullif the address isNULL.
-
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
-
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(MemoryStack stack)
Returns a newVkShaderModuleCreateInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkShaderModuleCreateInfo callocStack(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, 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, 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
-
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)CallsVkShaderModuleCreateInfo.validate(long)for each struct contained in the specified struct array.- Parameters:
array- the struct array to validatecount- the number of structs inarray
-
-