C Specification
The VkShaderCreateInfoEXT structure is defined as:
// Provided by VK_EXT_shader_object
typedef struct VkShaderCreateInfoEXT {
VkStructureType sType;
const void* pNext;
VkShaderCreateFlagsEXT flags;
VkShaderStageFlagBits stage;
VkShaderStageFlags nextStage;
VkShaderCodeTypeEXT codeType;
size_t codeSize;
const void* pCode;
const char* pName;
uint32_t setLayoutCount;
const VkDescriptorSetLayout* pSetLayouts;
uint32_t pushConstantRangeCount;
const VkPushConstantRange* pPushConstantRanges;
const VkSpecializationInfo* pSpecializationInfo;
} VkShaderCreateInfoEXT;
Members
-
sTypeis a VkStructureType value identifying this structure. -
pNextisNULLor a pointer to a structure extending this structure. -
flagsis a bitmask of VkShaderCreateFlagBitsEXT describing additional parameters of the shader. -
stageis a VkShaderStageFlagBits value specifying a single shader stage. -
nextStageis a bitmask of VkShaderStageFlagBits specifying which stages may be used as a logically next bound stage when drawing with the shader bound. A value of zero indicates this shader stage must be the last one. -
codeTypeis a VkShaderCodeTypeEXT value specifying the type of the shader code pointed to bepCode. -
codeSizeis the size in bytes of the shader code pointed to bepCode. -
pCodeis a pointer to the shader code to use to create the shader. -
pNameis a pointer to a null-terminated UTF-8 string specifying the entry point name of the shader for this stage. -
setLayoutCountis the number of descriptor set layouts pointed to bypSetLayouts. -
pSetLayoutsis a pointer to an array of VkDescriptorSetLayout objects used by the shader stage. The implementation must not access these objects outside of the duration of the command this structure is passed to. -
pushConstantRangeCountis the number of push constant ranges pointed to bypPushConstantRanges. -
pPushConstantRangesis a pointer to an array of VkPushConstantRange structures used by the shader stage. -
pSpecializationInfois a pointer to a VkSpecializationInfo structure, as described in Specialization Constants, orNULL.
Description
When specifying descriptor heap mappings, only mappings corresponding to
bindings that are actually present in the SPIR-V shader affect compilation.
Mappings are ignored when codeType is
VK_SHADER_CODE_TYPE_BINARY_EXT.
The resulting compiled binary from two different SPIR-V shaders which would
have identical bit patterns must remain identical even if the mapping
entries vary in any of the following ways:
-
Different numbers of unused mapping structures
-
Different binding counts for unused bindings
-
Unused parameters in mapping structures (e.g. sampler offsets)
-
Ignored parameters in mapping structures
-
Different order of mapping structures, used or unused
|
Note
|
Calculating the same offset in a mapping via different parameter values is not guaranteed to provide identical results. |
Document Notes
For more information, see the Vulkan Specification.
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.