[PATCH] D132913: [HLSL] Preserve vec3 for HLSL.

Chris Bieneman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 30 11:19:39 PDT 2022


beanz added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:3524
+  // Preserve vec3 for HLSL.
+  CmdArgs.push_back("-fpreserve-vec3-type");
 }
----------------
Preserving vec3 is required for HLSL correctness, this shouldn't be tied to the DXC driver mode. Instead, the option should be implied by the HLSL language mode. You should be able to add the following to the TableGen definition for the `preserve-vec3-type` flag:

```
ImpliedByAnyOf<[hlsl.KeyPath]>;
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132913/new/

https://reviews.llvm.org/D132913



More information about the cfe-commits mailing list