New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Template support #3533
Template support #3533
Conversation
|
|
Template support for HLSL - can be enabled using command line option -enable-templates - supports both function templates and aggregate templates - support is more or less equivalent to that in C++98 - use of template features and syntax introduced by C++11 or later may not be handled gracefully
|
|
Template support for HLSL - can be enabled using command line option -enable-templates - supports both function templates and aggregate templates - support is more or less equivalent to that in C++98 - use of template features and syntax introduced by C++11 or later may not be handled gracefully Co-authored-by: Tim Corringham <tcorring@amd.com>
|
@tcorringham Hi, when can this update ported to VS2019 library components officially (for |
|
Here is the comment I made on when the template work might make it into the main branch: #3696 (comment) The subject of when this will find its way to visual studio's included components is largely out of the hands of the maintainers of this project at present. That mechanism may be about to change though. I'll copy what I said in another forum on the subject: We are well aware of what a pain it is to get a dxc compiler in Visual Studio that is less than a year old I am interested in the community's thoughts on the subject! |
* Template support (#3533) Template support for HLSL - can be enabled using command line option -enable-templates - supports both function templates and aggregate templates - support is more or less equivalent to that in C++98 - use of template features and syntax introduced by C++11 or later may not be handled gracefully Co-authored-by: Tim Corringham <tcorring@amd.com> * [spirv] use rvalue for array index (#3616) The newly introduced template support generates a template instance of a struct method that has a slightly different AST from the one with hard-coded type. The template instance misses LValueToRValue cast for an array index. This PR lets SPIR-V backend uses rvalue for an array index. If the array index expression is not rvalue, it reports an error. * [templates] Fix issues with dependent template names (#3634) Errors were reported for the use of some dependent template names in cases where the code should have been accepted, caused by the incorrect handling of some HLSL cases - which are fixed by this change. Fixes #3556 * [spirv] add unit test to check function template instance (#3688) The function template instance works fine while the struct/class template instance has some issues, but we want to add an unit test for the function template instance to make sure it works fine. * [spirv] Handle class template instance (#3687) This change correctly generates struct type for the following template instance: ``` template <typename T> struct Foo { ... use T ... } ... Foo<int> Foo<float> ... ``` Fixes #3557 * Fix test failure on AddMulOps.hlsl Author: Adam Yang * Enables HLSL bitfields. (#3847) * Warns when semantic name same as integral/enum identifier. (#3866) Intent is to avoid confusion where C++ syntax would allow named constant as bitfield width, which is disallowed in HLSL because of conflict with syntax for semantics. * -strict-udt-casting prevents implicit casts between unrelated structs (#3891) * Add -enable-short-circuit option for operators &&, ||, :? (#3892) * Initial support of operator overloading (#3859) * Short circuit tests. (#3917) * Limit Sema intrinsic checks to builtin "op" table (#3963) The check for short curcuit intrinsics failed to account for intrinsic tables other than the default. This ensures that assumption is correct before performing the check Added a few other checks for similar uses Co-authored-by: Tim Corringham <timothy.corringham@amd.com> Co-authored-by: Tim Corringham <tcorring@amd.com> Co-authored-by: Jaebaek Seo <jaebaek@google.com> Co-authored-by: Helena Kotas <hekotas@microsoft.com> Co-authored-by: danbrown-amd <61992655+danbrown-amd@users.noreply.github.com> Co-authored-by: Tex Riddell <texr@microsoft.com> Co-authored-by: Adam Yang <31109344+adam-yang@users.noreply.github.com>
Template support for HLSL
not be handled gracefully