-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
weird binary problem #130
Comments
hmm very interesting. looks like its failing to find the glslLangValidator binary (which makes sense given its a standalone executable). https://github.com/cart/glsl-to-spirv/blob/7c4b23dc3c2386e85dad4f0492353b54e61c2fb8/src/lib.rs#L59 This is absolutely a problem that needs solving. I can think of three fixes:
|
The issue is we do "on demand shader compilation" based on run time state. Shaderc (or naga) is really the perfect fit for this kind of thing. We don't use the shaderc rust bindings because they complicate the builds, especially on windows, but that would also be a fix. |
It might be nice to have a bevy_shaderc plugin/optional feature? Naga is still a ways out from being usable even though a lot of progress has been made. |
The error 'Failed to execute glslangValidator' also occurs if you move the bevy folder. To reproduce:
To fix:
To fix (if you use sccache)
These fixes work for now. Let's work towards using naga :) |
Hey all, I hit this today too. I'm new to this ecosystem and not sure what the pros / cons of naga vs shaderc are; I note that docs say that shaderc should be used in place of bevy-glsl-to-spirv. @cart could you elaborate on the build issues with shaderc? Are they discussed somewhere? Would you be willing to accept a PR adding shaderc to solve this problem? |
There's already a PR out for it. I explain my rationale there: #324 |
I managed to work around this by forking Obviously this is a bit jank, but I should be ok for now. Thanks all! |
@cart I'm tackling this as part of moving glsl-to-spirv to using glslang as a library. Could you assign the issue to me? |
Sure, but lets sync up on what your plan is first. I would like to retain the "works without additional setup" properties of the current approach if we can, which would mean providing precompiled binaries. We have a few "solutions" to the problem in general:
|
Closed as we now use naga. |
Yesterday I built a binary on win10 in release mode and copied it to a new folder named "xxx". The cmd I used was:
cargo run --target-dir "D:/rust_build/all" --release --example button
Today I deleted all content under D:/rust_build/all and changed the cmd to the following and rebuilt it:
cargo run --target-dir "D:/rust_build/" --release --example button
Then of course no error occurred to the new binary. But the following error occurred when I ran the old binary under folder "xxx":
The text was updated successfully, but these errors were encountered: