ConstantBuffer.hlsl 393 B

123456789101112131415161718192021
  1. // RUN: %dxr -E main -remove-unused-globals %s | FileCheck %s
  2. // RUN: %dxr -E main -remove-unused-functions %s | FileCheck %s -check-prefix=KEEP_GLOBAL
  3. // CHECK-NOT:struct
  4. // CHECK-NOT:ConstantBuffer.
  5. // CHECK:float main
  6. // KEEP_GLOBAL:struct
  7. // KEEP_GLOBAL:ConstantBuffer.
  8. // KEEP_GLOBAL:float main
  9. struct ST
  10. {
  11. uint t;
  12. };
  13. ConstantBuffer<ST> cbv;
  14. float main() : SV_Target {
  15. return 1;
  16. }