-
Notifications
You must be signed in to change notification settings - Fork 37
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
Geometry shader support #10
base: master
Are you sure you want to change the base?
Conversation
What does this actually output in the MSL backend? Metal doesn't support geometry shaders at all, so I don't know what the compilation result would or should be. Is it a compute shader of some sort? Since HLSL is also apparently not supported, I'm a little hesitant to support this. It will only work on a very limited set of targets, as far as I can tell. |
Let me check the MSL output. I'll post it here. I hope that khronos group will finish hlsl support one day. It's on the list of things to do at least. |
#include <metal_stdlib> using namespace metal; struct main0_out unknown main0_out main0() |
My point is that since veldrid.spirv is build on top of spirv cross it should provide all spirv cross functionality. The user should be aware of limitations but he should not be deprived from abilities. |
Unfortunately, I don't see how that Metal shader will actually compile, so it seems like that is just placeholder output for something that isn't really supported. Combine that with the fact that it doesn't work for HLSL, and this effectively only works on Vulkan and OpenGL.
I think of Veldrid.SPIRV as the library that hooks up Veldrid and SPIRV-Cross in the most meaningful and portable (e.g. across graphics API's) way possible. This is why some of the public APIs look the way they do. For example, the CompileVertexFragment function is fused because it allows the compiler to generate code and standardized resource identities that all of Veldrid's backends understand. I would be more comfortable with getting this merged if:
|
I should also make another important point: I'd rather encourage people to use solutions that are more portable and future-facing, like compute shaders, instead of adding in support for things like this that aren't as well-supported. Geometry shaders are optional in Vulkan, they will probably never be supported with Metal, and I wouldn't be surprised if future web graphics API's leave them out as well. |
It seems to be ok for everything except HLSL due to lack of HLSL support in SPIRV-CROSS. I hope you won't consider it as a blocking issue as it is still useful for other platforms.