https://github.com/llvm-beanz requested changes to this pull request.

I think this approach probably needs some adjustment. HLSL allows 
constructor-like syntax but it behaves the same way the HLSL initializer list 
syntax does, so matrix initialization should be done through SemaHLSL’s 
initialization list handling.

Here’s an example of an odd case that really makes this special:
```

struct F {
    float f[16];
};

export void fn() {
    F f;
    float4x4 M = float4x4(f);
}
```

https://godbolt.org/z/z9GoGvnrK

The language spec that describes aggregate initialization is available 
[here](https://microsoft.github.io/hlsl-specs/specs/hlsl.html#Decl.Init.Agg).



https://github.com/llvm/llvm-project/pull/160960
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to