HLSL: allow GS-specific methods in other stages
Using GS methods such as Append() in non-GS stages should be ignored, but was creating errors due to the lack of a stream output symbol for the non-GS stage.
This commit is contained in:
parent
c48c8e76e1
commit
c6510a33ff
4 changed files with 142 additions and 0 deletions
17
Test/hlsl.fraggeom.frag
Normal file
17
Test/hlsl.fraggeom.frag
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// test geometry shader in fragment shader. GS attributes should be successfully ignored.
|
||||
|
||||
struct myVertex {
|
||||
float4 pos : SV_Position;
|
||||
};
|
||||
|
||||
[maxvertexcount(1)]
|
||||
void GS_Draw(point myVertex IN, inout PointStream<myVertex> OutputStream)
|
||||
{
|
||||
OutputStream.Append(IN);
|
||||
OutputStream.RestartStrip();
|
||||
}
|
||||
|
||||
float4 main() : SV_TARGET
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue