writeToInput4.hlsl 292 B

123456789101112131415161718
  1. // RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
  2. // Make sure the input is used.
  3. // CHECK: call float @dx.op.loadInput.f32
  4. struct Input {
  5. float a : A;
  6. float b : B;
  7. };
  8. Input ci;
  9. float4 main(Input i) : SV_Target {
  10. float c = i.a + i.b;
  11. i = ci;
  12. c += i.a * i.b;
  13. return c;
  14. }