Raev

Direct3D10 documentation states that:

"The purpose of the SO stage is to write vertex data streamed out of the GS stage (or the VS stage if the GS stage is inactive)..."

Does this indicate we can stream out of the vertex shader There is no

CreateGeometryShaderWithStreamOutput- like function to create a VS with SO, and if you disable the GS with SO buffers bound, all you get is a bunch of d3d warnings stating the buffers are redundant.

Is there some other way to stream out of VS somehow

Thank you.



Re: Direct3D 10 Stream Output after VS

Alexey Barkovoy

Have not tried this by myself, but it should be (code source is ATIs GDC07 presentation by Guennadi Riguer):

Code Snippet
technique10 t0
{pass p0
{
SetVertexShader(CompileShader(vs_4_0,VsMain()));
SetGeometryShader(ConstructGSWithSO(CompileShader(vs_4_0, VsMain()),"SV_Position"));
SetPixelShader(CompileShader(ps_4_0, PsMain()));
} }





Re: Direct3D 10 Stream Output after VS

Christian Lavallee

That's the way to do it. Also, if you don't use effect, you just pass in the vertex shader output signature (the shader blob contains this) to CreateGeometryShaderWithStreamOutput instead of a GS and use a StreamOutLayout that contains matching semantics with your VS outputs.




Re: Direct3D 10 Stream Output after VS

Raev

Thank you people. Just came to confirm it really does work this way ;]