VKSHADERMODULECREATE(3)

NAME
VkShaderModuleCreateInfo - Structure specifying parameters of a newly created shader module

C SPECIFICATION

The VkShaderModuleCreateInfo structure is defined as:

    typedef struct VkShaderModuleCreateInfo {
        VkStructureType              sType;
        const void*                  pNext;
        VkShaderModuleCreateFlags    flags;
        size_t                       codeSize;
        const uint32_t*              pCode;
    } VkShaderModuleCreateInfo;

MEMBERS

    • sType is the type of this structure.

    • pNext is NULL or a pointer to an extension-specific structure.

    • flags is reserved for future use.

    • codeSize is the size, in bytes, of the code pointed to by pCode.

    • pCode points to code that is used to create the shader module. The type and format of the code is determined from the content of the memory addressed by pCode.

DESCRIPTION

VALID USAGE

    • sType must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO

    • pNext must be NULL

    • flags must be 0

    • pCode must be a pointer to an array of [ $codeSize uint32_t values

    • codeSize must be greater than 0

    • codeSize must be a multiple of 4. If the VK_NV_glsl_shader extension is enabled and pCode references GLSL code codeSize can be a multiple of 1

    • pCode must point to valid SPIR-V code, formatted and packed as described by the ???. If the VK_NV_glsl_shader extension is enabled pCode can instead reference valid GLSL code and must be written to the GL_KHR_vulkan_glsl extension specification

    • pCode must adhere to the validation rules described by the Validation Rules within a Module section of the SPIR-V Environment appendix. If the VK_NV_glsl_shader extension is enabled pCode can be valid GLSL code with respect to the GL_KHR_vulkan_glsl GLSL extension specification

    • pCode must declare the Shader capability for SPIR-V code

    • pCode 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

SEE ALSO

VkShaderModuleCreateFlags, VkStructureType, vkCreateShaderModule

DOCUMENT NOTES

For more information, see the Vulkan Specification at URL

https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#VkShaderModuleCreateInfo

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification,not directly.

COPYRIGHT

Copyright (c) 2014-2016 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

AUTHOR

Khronos Group
    Author.