llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
26.8k stars 10.98k forks source link

[DirectX backend] Generate metadata for shader props #57948

Open python3kgae opened 1 year ago

python3kgae commented 1 year ago

Now only kDxilShaderFlagsTag and kDxilNumThreadsTag are supported. Need to support all these tags while supporting more shader profiles.

  static const unsigned kDxilShaderFlagsTag     = 0;
  static const unsigned kDxilGSStateTag         = 1;
  static const unsigned kDxilDSStateTag         = 2;
  static const unsigned kDxilHSStateTag         = 3;
  static const unsigned kDxilNumThreadsTag      = 4;
  static const unsigned kDxilAutoBindingSpaceTag    = 5;
  static const unsigned kDxilRayPayloadSizeTag  = 6;
  static const unsigned kDxilRayAttribSizeTag   = 7;
  static const unsigned kDxilShaderKindTag      = 8;
  static const unsigned kDxilMSStateTag         = 9;
  static const unsigned kDxilASStateTag         = 10;
  static const unsigned kDxilWaveSizeTag        = 11;
  static const unsigned kDxilEntryRootSigTag    = 12;

Doc at https://github.com/microsoft/DirectXShaderCompiler/blob/main/docs/DXIL.rst#shader-properties-and-capabilities

davidcook-msft commented 1 month ago

This needs to be broken down in a per-feature manner. Keeping as needing additional refinement to create the new issues.