-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
TSL: Respect types in WGSL Layouts #28669
TSL: Respect types in WGSL Layouts #28669
Conversation
Did you mean: The PR broke the |
This can happen if the type is |
Not just in texture_2d, but pretty much any type that is not a fundamental data type like a vector, primitive type, or matrix type. Additionally, for some reason, when a texture_2d was added as an input rather than a texture_2d, an additional mat3x3 uniform was added to the wgsl objectStruct. I haven't investigated why however. |
From what I understand and saw on the WebGPU specs a condition as simple as: if ( resolvedType.startsWith( 'texture' ) ) {
resolvedType = type.split( '<' )[ 0 ];
} Should be enough to support all non-fundamental data (mostly texture/texture_storage) in the node builder. /cc @sunag @cmhhelgeson |
Merging... thanks! |
Maybe Related: #28659 #28577
Description
The regex function in the parsing method of
WGSLNodeFunction
was not taking in account the<abc>
part resulting in not respecting the type properties. For example the type ofvec2<ivec2>
would be converted tovec2
instead ofivec2
.This PR fixes the issue.
This contribution is funded by Utsubo