HLLowerUDT.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // //
  3. // HLLowerUDT.h //
  4. // Copyright (C) Microsoft Corporation. All rights reserved. //
  5. // This file is distributed under the University of Illinois Open Source //
  6. // License. See LICENSE.TXT for details. //
  7. // //
  8. // Lower user defined type used directly by certain intrinsic operations. //
  9. // //
  10. ///////////////////////////////////////////////////////////////////////////////
  11. #pragma once
  12. #include "dxc/Support/Global.h"
  13. #include "dxc/DXIL/DxilConstants.h"
  14. #include "dxc/DXIL/DxilTypeSystem.h"
  15. namespace llvm {
  16. class Constant;
  17. class Function;
  18. class StructType;
  19. class Type;
  20. class Value;
  21. } // namespace llvm
  22. namespace hlsl {
  23. class DxilTypeSystem;
  24. llvm::StructType *GetLoweredUDT(
  25. llvm::StructType *structTy, hlsl::DxilTypeSystem *pTypeSys = nullptr);
  26. llvm::Constant *TranslateInitForLoweredUDT(
  27. llvm::Constant *Init, llvm::Type *NewTy,
  28. // We need orientation for matrix fields
  29. hlsl::DxilTypeSystem *pTypeSys,
  30. hlsl::MatrixOrientation matOrientation = hlsl::MatrixOrientation::Undefined);
  31. void ReplaceUsesForLoweredUDT(llvm::Value *V, llvm::Value *NewV);
  32. } // namespace hlsl