[clang] [HLSL] Implement D3DCOLORtoUBYTE4 intrinsic (PR #122202)

Finn Plummer via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 9 20:24:02 PST 2025


================
@@ -33,6 +33,14 @@ constexpr enable_if_t<sizeof(U) == sizeof(T), U> bit_cast(T F) {
   return __builtin_bit_cast(U, F);
 }
 
+constexpr vector<uint, 4> d3d_color_to_ubyte4(vector<float, 4> V) {
----------------
inbelic wrote:

```suggestion
constexpr vector<uint, 4> D3DColorToUByte4Impl(vector<float, 4> V) {
```
I think this follows more to how the length builtin was defined

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


More information about the cfe-commits mailing list