shader-slang / slang

Making it easier to work with shaders
MIT License
1.81k stars 161 forks source link

Remove extraneous legacy glsl target names #4271

Closed Raildex closed 1 month ago

Raildex commented 1 month ago

Slang has three glsl targets:

glsl glsl-vulkan glsl_vulkan-one-desc

I would expect glsl to be OpenGL GLSL, but it spits out gl_VertexIndex instead of gl_VertexId for example, which is Vulkan GLSL. So all three targets are actually Vulkan GLSL

csyonghe commented 1 month ago

The Vulkan flavored glsl is the only GLSL we officially support. We will need a glsl-legacy to profile to support old OpenGL glsl.

Raildex commented 1 month ago

so why do 3 glsl targets exist then?

csyonghe commented 1 month ago

They exist for legacy reasons, and we need to clean them up.

bmillsNV commented 1 month ago

@Raildex is this a blocker for you if we don't fix this? We'll plan to clean up the targets and clarify that only the Vulkan style GLSL is supported. Any concerns with this approach?

swoods-nv commented 1 month ago

Proceeding with treating as cleanup.