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
sType
must beSTRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO
pNext
must beNULL
flags
must be 0pCode
must be a pointer to an array ofcodeSize / 4
uint32_t
valuescodeSize
must be greater than 0codeSize
must be a multiple of 4pCode
must 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]pCode
must adhere to the validation rules described by the Validation Rules within a Module section of the SPIR-V Environment appendixpCode
must declare theShader
capabilitypCode
must not declare any capability that is not supported by the API, as described by the Capabilities section of the SPIR-V Environment appendix- If
pCode
declares 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_INFO
pNext
– reserved for use by extensionsflags
– reserved for future usecodeSize
– 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; const void * pNext; VkShaderModuleCreateFlags flags; size_t codeSize; const uint32_t * pCode; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
VkShaderModuleCreateInfo.Buffer
An array ofVkShaderModuleCreateInfo
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The 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 aVkShaderModuleCreateInfo
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static VkShaderModuleCreateInfo
calloc()
Returns a newVkShaderModuleCreateInfo
instance allocated withmemCalloc
.static VkShaderModuleCreateInfo.Buffer
calloc(int capacity)
Returns a newVkShaderModuleCreateInfo.Buffer
instance allocated withmemCalloc
.static VkShaderModuleCreateInfo
callocStack()
Returns a newVkShaderModuleCreateInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkShaderModuleCreateInfo.Buffer
callocStack(int capacity)
Returns a newVkShaderModuleCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkShaderModuleCreateInfo.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newVkShaderModuleCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkShaderModuleCreateInfo
callocStack(MemoryStack stack)
Returns a newVkShaderModuleCreateInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.long
codeSize()
Returns the value of thecodeSize
field.static VkShaderModuleCreateInfo
create()
Returns a newVkShaderModuleCreateInfo
instance allocated withBufferUtils
.static VkShaderModuleCreateInfo.Buffer
create(int capacity)
Returns a newVkShaderModuleCreateInfo.Buffer
instance allocated withBufferUtils
.static VkShaderModuleCreateInfo
create(long address)
Returns a newVkShaderModuleCreateInfo
instance for the specified memory address ornull
if the address isNULL
.static VkShaderModuleCreateInfo.Buffer
create(long address, int capacity)
Create aVkShaderModuleCreateInfo.Buffer
instance at the specified memory.int
flags()
Returns the value of theflags
field.VkShaderModuleCreateInfo
flags(int value)
Sets the specified value to theflags
field.static VkShaderModuleCreateInfo
malloc()
Returns a newVkShaderModuleCreateInfo
instance allocated withmemAlloc
.static VkShaderModuleCreateInfo.Buffer
malloc(int capacity)
Returns a newVkShaderModuleCreateInfo.Buffer
instance allocated withmemAlloc
.static VkShaderModuleCreateInfo
mallocStack()
Returns a newVkShaderModuleCreateInfo
instance allocated on the thread-localMemoryStack
.static VkShaderModuleCreateInfo.Buffer
mallocStack(int capacity)
Returns a newVkShaderModuleCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
.static VkShaderModuleCreateInfo.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newVkShaderModuleCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
.static VkShaderModuleCreateInfo
mallocStack(MemoryStack stack)
Returns a newVkShaderModuleCreateInfo
instance allocated on the specifiedMemoryStack
.VkShaderModuleCreateInfo
nset(long struct)
Unsafe version ofset
.java.nio.ByteBuffer
pCode()
Returns aByteBuffer
view of the data pointed to by thepCode
field.VkShaderModuleCreateInfo
pCode(java.nio.ByteBuffer value)
Sets the address of the specifiedByteBuffer
to thepCode
field.long
pNext()
Returns the value of thepNext
field.VkShaderModuleCreateInfo
pNext(long value)
Sets the specified value to thepNext
field.VkShaderModuleCreateInfo
set(int sType, long pNext, int flags, java.nio.ByteBuffer pCode)
Initializes this struct with the specified values.VkShaderModuleCreateInfo
set(VkShaderModuleCreateInfo src)
Copies the specified struct data to this struct.int
sizeof()
Returns thesizeof(struct)
.int
sType()
Returns the value of thesType
field.VkShaderModuleCreateInfo
sType(int value)
Sets the specified value to thesType
field.static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(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 aVkShaderModuleCreateInfo
instance at the current position of the specifiedByteBuffer
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
-
sizeof
public int sizeof()
Description copied from class:Struct
Returns thesizeof(struct)
.
-
sType
public int sType()
Returns the value of thesType
field.
-
pNext
public long pNext()
Returns the value of thepNext
field.
-
flags
public int flags()
Returns the value of theflags
field.
-
codeSize
public long codeSize()
Returns the value of thecodeSize
field.
-
pCode
public java.nio.ByteBuffer pCode()
Returns aByteBuffer
view of the data pointed to by thepCode
field.
-
sType
public VkShaderModuleCreateInfo sType(int value)
Sets the specified value to thesType
field.
-
pNext
public VkShaderModuleCreateInfo pNext(long value)
Sets the specified value to thepNext
field.
-
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 specifiedByteBuffer
to thepCode
field.
-
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 newVkShaderModuleCreateInfo
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkShaderModuleCreateInfo calloc()
Returns a newVkShaderModuleCreateInfo
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkShaderModuleCreateInfo create()
Returns a newVkShaderModuleCreateInfo
instance allocated withBufferUtils
.
-
create
public static VkShaderModuleCreateInfo create(long address)
Returns a newVkShaderModuleCreateInfo
instance for the specified memory address ornull
if the address isNULL
.
-
malloc
public static VkShaderModuleCreateInfo.Buffer malloc(int capacity)
Returns a newVkShaderModuleCreateInfo.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkShaderModuleCreateInfo.Buffer calloc(int capacity)
Returns a newVkShaderModuleCreateInfo.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkShaderModuleCreateInfo.Buffer create(int capacity)
Returns a newVkShaderModuleCreateInfo.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkShaderModuleCreateInfo.Buffer create(long address, int capacity)
Create aVkShaderModuleCreateInfo.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static VkShaderModuleCreateInfo mallocStack()
Returns a newVkShaderModuleCreateInfo
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkShaderModuleCreateInfo callocStack()
Returns a newVkShaderModuleCreateInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkShaderModuleCreateInfo mallocStack(MemoryStack stack)
Returns a newVkShaderModuleCreateInfo
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkShaderModuleCreateInfo callocStack(MemoryStack stack)
Returns a newVkShaderModuleCreateInfo
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkShaderModuleCreateInfo.Buffer callocStack(int capacity)
Returns a newVkShaderModuleCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkShaderModuleCreateInfo.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkShaderModuleCreateInfo.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and 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
-
-