KhronosGroup / glslang

Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator.
Other
2.9k stars 816 forks source link

error report when use GL_OES_EGL_image_external_essl3 #3585

Closed subenle-nreal closed 1 month ago

subenle-nreal commented 2 months ago

It seems that extension GL_OES_EGL_image_external_essl3 has been supported with https://github.com/KhronosGroup/glslang/pull/1044

But when I try to exec with file https://github.com/KhronosGroup/glslang/blob/main/Test/300samplerExternal.frag:
glslangValidator -C --auto-map-bindings --target-env vulkan1.1 300samplerExternal.frag

Some error is reported that seems should not exist;

ERROR: #version: ES shaders for SPIR-V require version 310 or higher
ERROR: 300samplerExternal.frag:12: 'sampler/image' : cannot construct this type
ERROR: 300samplerExternal.frag:12: 'constructor' : too many arguments
ERROR: 300samplerExternal.frag:13: 'sampler/image' : cannot construct this type
ERROR: 300samplerExternal.frag:13: 'constructor' : too many arguments
ERROR: 300samplerExternal.frag:14: 'sampler/image' : cannot construct this type
ERROR: 300samplerExternal.frag:14: 'constructor' : too many arguments
ERROR: 300samplerExternal.frag:15: 'texture2DProj' : no matching overloaded function found
ERROR: 300samplerExternal.frag:16: 'texture2DProj' : no matching overloaded function found

//  ==== Those ERROR should not be reported! ====
ERROR: 300samplerExternal.frag:20: 'textureSize' : no matching overloaded function found
ERROR: 300samplerExternal.frag:21: 'texture' : no matching overloaded function found
ERROR: 300samplerExternal.frag:22: 'texture' : no matching overloaded function found
ERROR: 300samplerExternal.frag:23: 'textureProj' : no matching overloaded function found
ERROR: 300samplerExternal.frag:24: 'textureProj' : no matching overloaded function found
ERROR: 300samplerExternal.frag:25: 'textureProj' : no matching overloaded function found
ERROR: 300samplerExternal.frag:26: 'textureProj' : no matching overloaded function found
ERROR: 300samplerExternal.frag:27: 'texelFetch' : no matching overloaded function found

ERROR: 300samplerExternal.frag:29: 'sampler/image' : cannot construct this type
ERROR: 300samplerExternal.frag:29: 'constructor' : too many arguments
ERROR: 300samplerExternal.frag:30: 'texture2DProjLod' : no matching overloaded function found
ERROR: 300samplerExternal.frag:31: 'texture' : no matching overloaded function found
ERROR: 300samplerExternal.frag:32: 'textureProjLod' : no matching overloaded function found
ERROR: 300samplerExternal.frag:38: 'samplerExternalOES' : required extension not requested: GL_OES_EGL_image_external_essl3
ERROR: 300samplerExternal.frag:41: '' :  syntax error, unexpected IDENTIFIER, expecting LEFT_BRACE or COMMA or SEMICOLON
ERROR: 24 compilation errors.  No code generated.
arcady-lunarg commented 2 months ago

What kind of SPIR-V is this supposed to be generating? Is generation of SPIR-V with this extension even supported in the first place?

subenle-nreal commented 2 months ago

What kind of SPIR-V is this supposed to be generating? Is generation of SPIR-V with this extension even supported in the first place?

I don't understand the SPIRV format; I just have a project that needs to switch from OpenGL to Vulkan, and I've found that shaders relying on this extension can't be properly converted to SPIRV.

subenle-nreal commented 1 month ago

I've tried without extension GL_OES_EGL_image_external_essl3,with YUVConversion feature, it worked fined. just close this issue.