multiStreamGS2.hlsl 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // RUN: %dxc -E main -T gs_6_0 %s | FileCheck %s
  2. // CHECK: when multiple GS output streams are used they must be pointlists
  3. struct MyStruct
  4. {
  5. float4 pos : SV_Position;
  6. float2 a : AAA;
  7. };
  8. struct MyStruct2
  9. {
  10. uint3 X : XXX;
  11. float4 p[3] : PPP;
  12. uint3 Y : YYY;
  13. };
  14. int g1;
  15. [maxvertexcount(12)]
  16. void main(point float4 array[1] : COORD, inout TriangleStream<MyStruct> OutputStream0,
  17. inout PointStream<MyStruct2> OutputStream1,
  18. inout PointStream<MyStruct> OutputStream2)
  19. {
  20. float4 r = array[0];
  21. MyStruct a = (MyStruct)0;
  22. MyStruct2 b = (MyStruct2)0;
  23. a.pos = array[r.x];
  24. a.a = r.xy;
  25. b.X = r.xyz;
  26. b.Y = a.pos.xyz;
  27. b.p[2] = a.pos * 44;
  28. if (g1) {
  29. OutputStream0.Append(a);
  30. OutputStream0.RestartStrip();
  31. } else {
  32. b.X.x = r.w;
  33. OutputStream1.Append(b);
  34. OutputStream1.RestartStrip();
  35. }
  36. OutputStream1.Append(b);
  37. OutputStream1.RestartStrip();
  38. OutputStream2.Append(a);
  39. OutputStream2.RestartStrip();
  40. }