What are The SPIR-V Capability (Geometry) Requirements

807 views Asked by At

I have 2 framebuffers. First, one is layered. And renders HDR image to Cubemap. In this Renderpass Geometry Shader is used.

Debug layer gives me the following error message.

[VAL][VUID-VkShaderModuleCreateInfo-pCode-01091] Validation Error: [ VUID-VkShaderModuleCreateInfo-pCode-01091 ]
        Object 0: handle = 0x14f9a58bfe8, type = VK_OBJECT_TYPE_DEVICE;
        | MessageID = 0xa7bb8db6 | vkCreateShaderModule(): The SPIR-V Capability (Geometry) was declared, but none of the requirements were met to use it.
        The Vulkan spec states: If pCode declares any of the capabilities listed in the SPIR-V Environment appendix, one of the corresponding requirements must be satisfied (https://vulkan.lunarg.com/doc/view/1.2.170.0/windows/1.2-extensions/vkspec.html#VUID-VkShaderModuleCreateInfo-pCode-01091)

I searched for SPIR-V geometry shader requirements but I couldn't find what I am missing. My Geometry shader code is

#version 450 core

layout(triangles, invocations = 6) in;
layout(triangle_strip, max_vertices = 3) out;

void main()
{
    for(int i = 0; i < 3; i++) 
    { 
        gl_Layer = gl_InvocationID ;
        gl_Position = gl_in[i].gl_Position + vec4(vec3(gl_InvocationID)/5 , 1);
        EmitVertex();
    }
    EndPrimitive();
} 
0

There are 0 answers