vulkan-3.26.1: Bindings to the Vulkan graphics API.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Vulkan.Extensions.VK_NV_glsl_shader

Description

Name

VK_NV_glsl_shader - device extension

VK_NV_glsl_shader

Name String
VK_NV_glsl_shader
Extension Type
Device extension
Registered Extension Number
13
Revision
1
Ratification Status
Not ratified
Extension and Version Dependencies; Deprecation State
  • Deprecated without replacement
Contact

Other Extension Metadata

Last Modified Date
2016-02-14
IP Status
No known IP claims.
Contributors
  • Piers Daniell, NVIDIA

Description

This extension allows GLSL shaders written to the GL_KHR_vulkan_glsl extension specification to be used instead of SPIR-V. The implementation will automatically detect whether the shader is SPIR-V or GLSL, and compile it appropriately.

Deprecation

Functionality in this extension is outside of the scope of Vulkan and is better served by a compiler library such as glslang. No new implementations will support this extension, so applications should not use it.

New Enum Constants

Examples

Example 1

Passing in GLSL code

    char const vss[] =
        "#version 450 core\n"
        "layout(location = 0) in vec2 aVertex;\n"
        "layout(location = 1) in vec4 aColor;\n"
        "out vec4 vColor;\n"
        "void main()\n"
        "{\n"
        "    vColor = aColor;\n"
        "    gl_Position = vec4(aVertex, 0, 1);\n"
        "}\n"
    ;
    VkShaderModuleCreateInfo vertexShaderInfo = { VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO };
    vertexShaderInfo.codeSize = sizeof vss;
    vertexShaderInfo.pCode = vss;
    VkShaderModule vertexShader;
    vkCreateShaderModule(device, &vertexShaderInfo, 0, &vertexShader);

Version History

  • Revision 1, 2016-02-14 (Piers Daniell)

    • Initial draft

See Also

No cross-references are available

Document Notes

For more information, see the Vulkan Specification

This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.

Documentation

pattern NV_GLSL_SHADER_SPEC_VERSION :: forall a. Integral a => a Source #

type NV_GLSL_SHADER_EXTENSION_NAME = "VK_NV_glsl_shader" Source #

pattern NV_GLSL_SHADER_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #