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.NativeResource
Structure specifying parameters of a newly created shader module.Valid Usage
codeSize
must be greater than 0- If
pCode
points to SPIR-V code,codeSize
must be a multiple of 4 pCode
must 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_glsl
extension specification- If
pCode
points 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
pCode
points to GLSL code, it must be valid GLSL code written to theGL_KHR_vulkan_glsl
GLSL extension specification pCode
must declare theShader
capability for SPIR-V codepCode
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 listed as optional: in the SPIR-V Environment appendix, the corresponding feature(s) must be enabled.
Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO
pNext
must beNULL
or a pointer to a valid instance ofVkShaderModuleValidationCacheCreateInfoEXT
flags
must be a valid combination ofVkShaderModuleCreateFlagBits
valuespCode
must be a valid pointer to an array ofcodeSize / 4
uint32_t
values
See Also
Member documentation
sType
– the type of this structure.pNext
–NULL
or 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 class
VkShaderModuleCreateInfo.Buffer
An array ofVkShaderModuleCreateInfo
structs.
-
Constructor Summary
Constructors Constructor 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 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, org.lwjgl.system.MemoryStack stack)
Returns a newVkShaderModuleCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkShaderModuleCreateInfo
callocStack(org.lwjgl.system.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.static VkShaderModuleCreateInfo.Buffer
create(long address, int capacity)
Create aVkShaderModuleCreateInfo.Buffer
instance at the specified memory.static VkShaderModuleCreateInfo
createSafe(long address)
static VkShaderModuleCreateInfo.Buffer
createSafe(long address, int capacity)
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, org.lwjgl.system.MemoryStack stack)
Returns a newVkShaderModuleCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
.static VkShaderModuleCreateInfo
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkShaderModuleCreateInfo
instance allocated on the specifiedMemoryStack
.static long
ncodeSize(long struct)
Unsafe version ofcodeSize()
.static void
ncodeSize(long struct, long value)
Sets the specified value to thecodeSize
field of the specifiedstruct
.static int
nflags(long struct)
Unsafe version offlags()
.static void
nflags(long struct, int value)
Unsafe version offlags
.static java.nio.ByteBuffer
npCode(long struct)
Unsafe version ofpCode
.static void
npCode(long struct, java.nio.ByteBuffer value)
Unsafe version ofpCode
.static long
npNext(long struct)
Unsafe version ofpNext()
.static void
npNext(long struct, long value)
Unsafe version ofpNext
.static int
nsType(long struct)
Unsafe version ofsType()
.static void
nsType(long struct, int value)
Unsafe version ofsType
.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()
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)
Callsvalidate(long)
for each struct contained in the specified struct array.
-
-
-
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()
- Specified by:
sizeof
in classorg.lwjgl.system.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.
-
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.
-
createSafe
@Nullable public static VkShaderModuleCreateInfo createSafe(long address)
-
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
-
createSafe
@Nullable public static VkShaderModuleCreateInfo.Buffer createSafe(long address, int 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(org.lwjgl.system.MemoryStack stack)
Returns a newVkShaderModuleCreateInfo
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkShaderModuleCreateInfo callocStack(org.lwjgl.system.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, org.lwjgl.system.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, org.lwjgl.system.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
-
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 thecodeSize
field 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
-
-