danielscherzer / GLSL

VSIX Project that provides GLSL language integration.
257 stars 28 forks source link

Unexpected C7548 error prompt #83

Closed Eudaldz closed 3 years ago

Eudaldz commented 3 years ago

Installed product versions

Description

Unexpected error prompt when declaring inputs using layout(location) in version 330 core.

Current behavior

Version 330 core. When writing vertex shader, declaring an input with the use of layout(location) incorreclty prompts the error: C7548: 'layout(location)' requires "#extension GL_ARB_separate_shader_objects : enable" before use. The error prompts when there's no main function.

Expected behavior

The fact that there's no main function should be an error of some kind, but prompting this error specifically can cause confusion. If this is intended then nevermind.

danielscherzer commented 3 years ago

The extension does not do its own error analysis, but uses the output of glsl compilers. Did you set an external compiler in the extension options? If not the extension is using your graphics card driver to compile the shader. So maybe an update of the driver can help.