HLSL 5.0的语法问题
- Assembly code
struct GSOutput{int4 Pos : Position;int4 Color : Color;int4 Texcoord : Texcoord;};[maxvertexcount(1)]void gsBase (inout PointStream<GSOutput> OutputStream, inout PointStream<GSOutput> OutputStream1){GSOutput output;output.Pos = int4(1,2,3,4);output.Color = int4(5,6,7,8);output.Texcoord = int4(9,10,11,12);OutputStream.Append(output);output.Pos = int4(1,2,3,4); output.Color = int4(5,6,7,8);output.Texcoord = int4(9,10,11,12);OutputStream1.Append(output);};GeometryShader pGSComp = CompileShader(gs_5_0, gsBase());GeometryShader pGSwSO = ConstructGSWithSO(pGSComp, "0:Position.xy; 1:Position.zw; 2:Color.xy", "3:Texcoord.xyzw; 3:$SKIP.x;", NULL, NULL, 1);// The following two passes perform the same operationtechnique11 SOPoints{ pass { SetGeometryShader(ConstructGSWithSO(pGSComp, "0:Position.xy; 1:Position.zw; 2:Color.xy", "3:Texcoord.xyzw; 3:$SKIP.x;", NULL, NULL, 1)); } pass { SetGeometryShader(pGSwSO); }}
有这么一段话:
There is one special Semantic, labeled "$SKIP" which indicates an empty semantic, leaving the corresponding memory in the stream out buffer untouched. The $SKIP semantic cannot have a SemanticIndex, but can have a Mask.
具体情况请参考:http://msdn.microsoft.com/en-us/library/windows/desktop/ff476168%28v=vs.85%29.aspx
这段话似懂非懂,有没有明白的人给详细地说明一下。关键是说说$SKIP达成什么样的效果。
[解决办法]
。。5.0 新出的高端显卡才支持吧
[解决办法]
好吧,关于这个我啥都看不懂