I've attached a patch to add GLSL language support, compiling down to SPIR-V. It's based on master from this morning.
GLSL is the OpenGL Shading Language, used by OpenGL, OpenGL ES, and Vulkan graphics APIs. By convention, the recognized source file extensions are .vert, .tese, .tesc, .geom, .frag, and .comp corresponding to five stages in the graphics pipeline, and compute shaders. SPIR-V is a standardized hardware-independent intermediate language for shaders; basically an abstract machine language for GPUs. Vulkan drivers consume shaders in SPIR-V form. By convention its file extension is .spv The attached patch adds support for adding GLSL as a language, automatically resolving the open source "glslc" compiler. See https://github.com/google/shaderc/tree/master/glslc from https://github.com/google/shaderc The glslc compiler supports #include and -M style options for dependency generation. A test is included. I've tested it on a double-bootstrapped cmake on Linux, using Ninja. I've also manually verified dependency generation and checking with Ninja. Portions of the patch were derived from C++ compiler discovery, and Fortran support discovery for tests. Let me know if the patch is ok, or whether changes are required. I also have a subsequent patch to support the SPIR-V assembler (.spvasm -> .spv) but will wait until I've got this one right first. thanks, david
0001-Add-support-for-GLSL-to-SPIR-V-compilation.patch
Description: Binary data
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
