Dx11 hlsl: how to pass SV_VertexID from vertex shader to geom shader? Vertex Counter

Hi dduddes,

Me thinks there’s gotta be a way to pass SV_VertexId from my vertex shader function to Geometry Shader function? Essentially I want to track which is the current vertex in my geom shader. I could also run a vertex counter in my geom function but I guess thats’ the point of SV_vertexId… I have tried to pass SV_VertexID in many ways but I can’t find the correct semantics? or am I missing something in how to pass from vs to gs? Here is some code, question goes down also to how to pass a variable between shader fucntions withotu semantics(custom semantics?)
Thankx a lot guys!

struct vsIn
{
	float4 pos : POSITION;
	uint vertexId : SV_VertexId;
};

struct gsIn
{
    float4 pos: POSITION;
    uint vertexIdPassed : ?????????;
};

gsIn VS(vsIn input)
{
    gsIn output;
    output.pos  = input.pos;
    output.vertexIdPassed = input.VertexID;
}
struct gsIn
{
    float4 pos: POSITION;
    uint vertexIdPassed : VERTEXID;
};

Non sv semantics are user defined, so you can set whatever you want ;)

Thankx a lot Mr Vux! makes sense, that what custom semantic thing are for then. Wicked. Shame it has highlighted the fact that my extrude geom shader calculations are completely wrong but hey that’s for another thread. Thankx again man!