-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Metal Shaders support #1586
Comments
Synced to Apple’s issue tracker as rdar://132478984 |
Haven't tried it with Put If:
PathMatch: .*\.metal?
CompileFlags:
Add:
- '--std'
- 'c++17'
- '-x'
- 'c++'
- '-I'
- '/System/Library/Frameworks'
- '-I'
- '/Library/Frameworks'
- '-I'
- '/usr/local/include'
- '-I'
- '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/32023/lib/clang/32023.335/include'
- '-I'
- '/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.401/include/metal' After @ahoppen I wonder if it's worth it to mention this configuration somewhere in the sourcekit-lsp docs to ease other folks of cracking that down? UPD: All the other missing headers can be found following the steps below:
|
IIRC, Metal is a proper extension of C++ and has syntax constructs that won’t be supported by clangd. While your solution might cover many or most cases, I think the fact that it works is more a coincidence than proper support and thus I am very hesitant to offer it as any kind of officially supported solution in SourceKit-LSP’s docs. |
Yeah, fair enough. So looking forward to metal compiler will be supported by |
Description
Currently when I'm opening
metal
and defining it as a c++ scope I got AST error fromsourcekit-lsp
. This way there's actually a lack of metal shaders development support out of Xcode in both completion and diagnostic. It would be great to bring such support to sourcekit-lsp even thoughmetal
is Apple's proprietary technology.The text was updated successfully, but these errors were encountered: