GLSL icon indicating copy to clipboard operation
GLSL copied to clipboard

re: feature requests for ref/def/decl drilldown

Open Geof23 opened this issue 4 years ago • 1 comments

Hey Daniel and everybody --

I think this is a really nice VS extension for something I've been really wanting lately. I found this and added it to my tools. The syntax highlighting is great, and autocomplete too! I thought you were a little closer to 'go to definition' stuff, but really, it's not far off at all. Could probably build a dictionary from the glsl ('ast') output (in the compilation step that's needed for every unit already, obviously), maybe using debug info (which is a compiler option) to source symbols to file/linenos

I'm wondering if:

  1. It might be better, with the handling of exotic shaders, to go closer to home (like Khronos) for the compiler? I think they're about the reference for RT (and other) shaders. It might make it easier to keep things up to date
  2. I'm not sure your workaround for #includes is really needed (when you've got something like glslangValidator dialed in). This project should be able to consume all the flavors as they're used in the wild

I dug in a bit, because I had the impression that I was missing the symbol lookup functionality only because in my installation of GLSL language integration, my added compiler wasn't set up correctly. I did manage to get my 'external' to behave pretty well, despite several (potentially troublesome) included c++ headers in my .rgens and such (but making it work did require adding one or two strategic #defines to the command line).

Khronos has this little gem, with a complete glsl front-end and spir-v generator (https://github.com/KhronosGroup/glslang) that could possibly work as a submodule

Anyway, this is an awesome VS integration, and I'm sure will become even more helpful for bringing shader development out of the dark ages

Geof23 avatar Jan 27 '21 21:01 Geof23

Thanks for your feedback! If I understand you correctly you suggest to integrate the C++ Glslang component into the extension. I think this is indeed a good way to move forward, but also a major undertaking so it will probably take some time till I have finished a stable version.

danielscherzer avatar Feb 13 '21 07:02 danielscherzer