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

Simplify extensions. Add Debug PrintF #216

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

Conversation

Matthias-Fauconneau
Copy link
Contributor

No description provided.

Comment on lines +66 to +76
let mut original =
serde_json::from_str(
&std::str::from_utf8(
&fs::read(autogen_src_dir.join(
"external/SPIRV-Headers/include/spirv/unified1/spirv.core.grammar.json",
))
.unwrap(),
)
.unwrap(),
)
.unwrap();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
let mut original =
serde_json::from_str(
&std::str::from_utf8(
&fs::read(autogen_src_dir.join(
"external/SPIRV-Headers/include/spirv/unified1/spirv.core.grammar.json",
))
.unwrap(),
)
.unwrap(),
)
.unwrap();
let mut original = serde_json::from_str(
&fs::read_to_string(
autogen_src_dir
.join("external/SPIRV-Headers/include/spirv/unified1/spirv.core.grammar.json"),
)
.unwrap(),
)
.unwrap();

Maybe keep this simple with read_to_string? Same below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes! I didn't know about it ><.
There really should be a note in std:fs::read about read_to_string existence. It's not the first time this annoys me ^^

Comment on lines +82 to +84
("GLSL.std.450", "GLOp", "https://www.khronos.org/registry/spir-v/specs/unified1/GLSL.std.450.html"),
("OpenCL.std.100", "CLOp", "https://www.khronos.org/registry/spir-v/specs/unified1/OpenCL.ExtendedInstructionSet.100.html"),
("NonSemantic.DebugPrintF", "DebugPrintFOp", "https://github.com/KhronosGroup/Vulkan-ValidationLayers/blob/master/docs/debug_printf.md"),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please use spaces to indent this. The autoformatter refuses to do so because the lines are too long.

Suggested change
("GLSL.std.450", "GLOp", "https://www.khronos.org/registry/spir-v/specs/unified1/GLSL.std.450.html"),
("OpenCL.std.100", "CLOp", "https://www.khronos.org/registry/spir-v/specs/unified1/OpenCL.ExtendedInstructionSet.100.html"),
("NonSemantic.DebugPrintF", "DebugPrintFOp", "https://github.com/KhronosGroup/Vulkan-ValidationLayers/blob/master/docs/debug_printf.md"),
("GLSL.std.450", "GLOp", "https://www.khronos.org/registry/spir-v/specs/unified1/GLSL.std.450.html"),
("OpenCL.std.100", "CLOp", "https://www.khronos.org/registry/spir-v/specs/unified1/OpenCL.ExtendedInstructionSet.100.html"),
("NonSemantic.DebugPrintF", "DebugPrintFOp", "https://github.com/KhronosGroup/Vulkan-ValidationLayers/blob/master/docs/debug_printf.md"),

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.

None yet

2 participants