Geometry Shader in Monogame?

I fail to find any information about it. Trying to compile a fx file with Geometry Shader (GS) fails with “unexpected token ‘G’” so I would expect, there is no direct support?

I’ve sound some snippets where people inject a manually compiled GS during rendering by accessing the current DeviceContext. Is this the way to go with current monogame or do I just miss to do something special?

technique Default
	pass P0
		VertexShader = compile VS_SHADERMODEL VS();
		GeometryShader = compile GS_SHADERMODEL GS(); <-- compile fails here
		PixelShader = compile PS_SHADERMODEL PS();

I was looking into this early in my project and from what I read, there’s no support because MonoGame uses MojoShader which doesn’t support Geometry Shaders. There have been posts here and there abou adding support but it looks it opens up issues because of mobile support so I don’t think they ever really went anywhere.

Looks like Jjagg might have been looking into some support for this a while back. Unfortunately it was GLSL and not HLSL, but might be worth asking if he ever got it working.

I did get GLSL support functional, but that’s not directly related to the work on geometry shaders and we decided not to make it officially supported. I have a plan for a complete rewrite of the shader content pipeline, but it’ll take some time and I don’t have much rn (I’ve had this plan for about 1.5 years already).