[llvm] [DXIL] Add DXIL SubArch to correspond to version number (PR #89125)

S. Bharadwaj Yadavalli via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 18 10:20:09 PDT 2024


bharadwajy wrote:

> > > What's the plan for when a subarch isn't specified (ie, `dxil-pc-shadermodel-6.0`)?
> > > I propose defaulting to version 1.0 when SubArch is not explicitly specified.
> 
> So if I specify `dxil-pc-shadermodel-6.8` then the SubArch will be `DXILSubArch_v10`? Will that work out ok everywhere?

On second thoughts, it appears that shader model version is embedded in the `-T <target profile>` option specified on the HLSL compiler command line (e.g., `ps_6_0`, `lib_6_8`). Since Shader Model version is being decoupled from DXIL version, the target DXIL version is also required to be explicitly specified in the target triple. This implies `dxil-pc-shadermodel-6.8` would be flagged as an error.


https://github.com/llvm/llvm-project/pull/89125


More information about the llvm-commits mailing list