TSL Transpiler: Support more matrix types, bool vectors. #30517
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related issue: #27538
Description
The fix in #30501 is incomplete and does not account for
mat[234]x[234]
types. Additionally, I addedbvec[234]
type specifiers.hvec[234]
,dvec[234]
, andfvec[234]
are reserved in the language but not used. This is still far from complete, and both storage qualifiers and storage type specifiers (e.g.sampler2D
) are not supported. Further, suffixes and octal/hex representations are not tokenized correctly, if at all. I assume this is functionally only for porting ShaderToy shaders (unminified; no preprocessor) in examples, so this is best effort for that purpose. I maintain my own compiler aimed at robustness, but there is no clear way to have that serve as a front-end to node materials and have to maintain an IR over TSL.See "3.8 Keywords" of https://registry.khronos.org/OpenGL/specs/es/3.0/GLSL_ES_Specification_3.00.pdf.