vsg-dev / vsgExamples

Example programs that test and illustrate how to use the VSG and optional add-on libraries
MIT License
147 stars 67 forks source link

GLSL shader issue inside vsgTriangle when using amd ryzen #328

Open tvatooms opened 2 weeks ago

tvatooms commented 2 weeks ago

Hi All, Using AMD ryzen which hosts AMD radeon renoir IGPU , some examples (vsgTriangles) don't run because of shaders issues : when GL_ARB_separate_shader_objects extension enabled , layout values are not taken into account (specific to AMD . see AMD note inside : https://www.khronos.org/opengl/wiki/Layout_Qualifier_(GLSL) .

I'm not vulkan expert . However when removing the extension call, the issue still appears. Fixed when giving the same variable name on the outColor from vertex shader and the input from fragment (which is very limitating).

Any idea ?

AnyOldName3 commented 2 days ago

The AMD-specific note in that wiki page isn't relevant to the VSG as shaders are compiled and linked by glslang and fed to Vulkan as SPIR-V, not fed to AMD's OpenGL driver as GLSL to be compiled and linked, so any historic limitations of AMD's OpenGL driver (which probably aren't relevant anymore even for OpenGL as it had a total rewrite a couple of years ago).