This repository was archived by the owner on Oct 31, 2025. It is now read-only.
Merged
Conversation
Contributor
|
... oh wow, yeah, this code is really incorrect and should not be grabbing the name from the filename - and like, it's excessively weirdly complicated. I think I'd prefer to change the whole function to just something like this: fn compile_shaders() -> Vec<SpvFile> {
let sky_shader_path =
SpirvBuilder::new("examples/shaders/sky-shader", "spirv-unknown-vulkan1.1")
.print_metadata(MetadataPrintout::None)
.build()
.unwrap()
.module
.unwrap_single()
.to_path_buf();
let sky_shader = SpvFile {
name: "sky_shader".to_string(),
data: read_spv(&mut File::open(sky_shader_path).unwrap()).unwrap(),
};
vec![sky_shader]
}and to be honest, I don't know why we're even doing this whole |
Fix compile_shaders() to return correct shader name.
- Stop to get shader name from path. It was too complicated.
0398ca3 to
7133637
Compare
Contributor
Author
|
Yeah, I agree that the code is complicated. |
khyperia
approved these changes
Aug 3, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
example-runner-ashfails to run because it fails to getsky_shader.compile_shaders()had obtained shader name frompath.file_stem()but path isin my environment (Windows11).
I've fixed
compile_shaders()to return corrent shader name from path.Sorry if this fix is incompatioble for other environments.