retTBV.hlsl 357 B

1234567891011121314151617181920
  1. // RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
  2. // Make sure both a and b are used.
  3. // CHECK:extractvalue %dx.types.ResRet.i32 %{{.*}}, 0
  4. // CHECK:extractvalue %dx.types.ResRet.i32 %{{.*}}, 1
  5. struct S {
  6. float a;
  7. float b;
  8. };
  9. TextureBuffer<S> c: register(t2, space5);;
  10. S getS() {
  11. return c;
  12. }
  13. float main() : SV_Target {
  14. return c.a + getS().b;
  15. }