Skip to content
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

Change vertexFn parameters to accept a struct each. Handle TGSL vertex shader resolution #802

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

reczkok
Copy link
Collaborator

@reczkok reczkok commented Jan 22, 2025

closes #786

based on #798

Copy link

codesandbox-ci bot commented Jan 22, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@reczkok reczkok marked this pull request as ready for review January 27, 2025 13:41
@reczkok reczkok requested review from iwoplaza and mhawryluk January 27, 2025 13:41
Copy link
Collaborator

@mhawryluk mhawryluk left a comment

Choose a reason for hiding this comment

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

all examples using vertexFn don't work anymore. please fix them as part of this PR

Comment on lines +147 to +151
generationCtx.callStack.push(outputType);
const resolved = core.resolve(ctx, '@vertex ');
generationCtx.callStack.pop();

return resolved;
Copy link
Collaborator Author

@reczkok reczkok Jan 29, 2025

Choose a reason for hiding this comment

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

I don't know which one I prefer 🤔 @mhawryluk @iwoplaza?

Suggested change
generationCtx.callStack.push(outputType);
const resolved = core.resolve(ctx, '@vertex ');
generationCtx.callStack.pop();
return resolved;
try {
generationCtx.callStack.push(outputType);
return core.resolve(ctx, '@vertex ');
} finally {
generationCtx.callStack.pop();
}

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.

Vertex functions TGSL implementations should be given a single struct as the only parameter.
2 participants