Skip to content

impr: Add automatic type conversions when possible #1136

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

Merged
merged 17 commits into from
May 13, 2025
Merged

Conversation

reczkok
Copy link
Contributor

@reczkok reczkok commented Apr 8, 2025

closes #990
closes #970

Copy link

github-actions bot commented Apr 8, 2025

pkg.pr.new

packages

pnpm i https://pkg.pr.new/software-mansion/TypeGPU/typegpu@1136
pnpm i https://pkg.pr.new/software-mansion/TypeGPU/typegpu@4523ef8cabc776fe6e046f7993bd5626333e981e

benchmark
view benchmark

commit
view commit

@reczkok reczkok force-pushed the impr/tgsl-pointers branch from 3778c37 to 38806a3 Compare April 15, 2025 13:29
reczkok added 8 commits April 15, 2025 16:38
Consolidate WGSL type conversion and snippet generation logic into
`generationHelpers.ts`.

Introduce `coerceToSnippet` for handling various input values and
`convertStructValues` for struct literals. Improve implicit conversion
detection and add warnings. Update WGSL generator and resolution context
to use these helpers. Add tests.
@reczkok reczkok marked this pull request as ready for review May 5, 2025 13:42
Copy link
Collaborator

@iwoplaza iwoplaza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from the unresolved discussion, amazing work!! 🚀

Copy link
Collaborator

@iwoplaza iwoplaza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes yes yes! 🎉

@iwoplaza iwoplaza merged commit 68585e3 into main May 13, 2025
6 checks passed
@iwoplaza iwoplaza deleted the impr/tgsl-pointers branch May 13, 2025 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

impr: Properly handle TGSL pointers feat: Automatically convert resource (aka snippet) types in expressions
2 participants