-
Notifications
You must be signed in to change notification settings - Fork 15
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
Initial HLSL matrix spec #63
base: main
Are you sure you want to change the base?
Conversation
This is preliminary, but hopefully contains enough information about some of the earliest developments to make some decisions to confidently guide that development. Related to llvm/llvm-project#88060
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For vectors, clang's vector type extension is a subset of HLSL vector's capabilities and we handle that by giving ext vectors new capabilities when the HLSL language mode is enabled. Is there a reason to create a new vector type instead of just making this a language-mode difference?
* Declare matrices in different scopes (local, global, param, templates, etc) | ||
* Pass matrices as parameters | ||
* Return from functions | ||
* Lower to vector representations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to keep matrix information for SPIRV which has built-in matrix type.
matrix instead of `ConstantMatrixType`. | ||
* Override dimension checks to limit the sizes to values 1-4. | ||
* Override the element type check to allow for booleans. | ||
* Adds point accessors for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Adds point accessors for....'. <-- Left me on the edge of my seat here :)
However, it is too permissive in the allowable dimensions | ||
and lacking in various other ways that the matrices can be used. | ||
|
||
HLSL matrices in DXC have the following features that Clang matrices lack: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you provide some HLSL examples along with some of these descriptions to help better illustrate what is being presented here. You have some syntax here already which is nice.
### Mangling | ||
|
||
Mangling of Clang matrices is supported for Itanium but not Microsoft-style | ||
mangling. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is your plan here to upgrade/add support for MS style mangling to the base clang matrices support which will be inherited into the HLSL derived type?.. Or are you saying we would only implement MS mangling in the HLSL derived type?
This is preliminary, but hopefully contains enough information about some of the earliest developments to make some decisions to confidently guide that development.
Related to llvm/llvm-project#88060