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

export some of the shader loading functionality #8

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pwfff
Copy link
Contributor

@pwfff pwfff commented Sep 17, 2023

No description provided.

@pwfff
Copy link
Contributor Author

pwfff commented Sep 17, 2023

hm, might have made this a bit prematurely. i wanted to pass the shader loader into the preprocessor so it can load includes as well.

@pwfff
Copy link
Contributor Author

pwfff commented Sep 18, 2023

yeah, passing the loader in to the preprocessor is nice, but it's rough to do for the wasm target since i'm trying to do this as a sync trait...

Copy link
Contributor

@davidar davidar left a comment

Choose a reason for hiding this comment

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

Sorry for the delay, I haven't tested it yet but mostly looks good, I just wanted to check that removing std/ hasn't broken some of the include paths (the idea is that #include <string> goes to std/string.wgsl, though I suppose we could simplify that and just remove the std directory)

@@ -144,7 +141,7 @@ impl Preprocessor {
if path == "string" {
self.enable_strings = true;
}
fetch_include(format!("std/{path}")).await
fetch_include(path.to_string()).await
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason for this change?

@davidar davidar marked this pull request as draft May 19, 2024 09:26
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.

2 participants