SimpleGS4.hlsl 513 B

1234567891011121314151617181920212223242526
  1. // RUN: %dxc -E main -T gs_6_0 %s | FileCheck %s
  2. // CHECK: InputPrimitive=patch2
  3. // CHECK: emitStream
  4. // CHECK: cutStream
  5. // CHECK: i32 24}
  6. struct GSOut {
  7. float2 uv : TEXCOORD0;
  8. float4 clr : COLOR;
  9. float4 pos : SV_Position;
  10. };
  11. cbuffer b : register(b0) {
  12. float2 invViewportSize;
  13. };
  14. // geometry shader that outputs 3 vertices from a point
  15. [maxvertexcount(3)]
  16. [instance(24)]
  17. void main(InputPatch<GSOut, 2>points, inout PointStream<GSOut> stream) {
  18. stream.Append(points[0]);
  19. stream.RestartStrip();
  20. }