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

Make error messages more human #1139

Closed
LegNeato opened this issue Mar 26, 2024 · 2 comments
Closed

Make error messages more human #1139

LegNeato opened this issue Mar 26, 2024 · 2 comments
Labels
t: enhancement A new feature or improvement to an existing one.

Comments

@LegNeato
Copy link
Contributor

Currently the rust-gpu error messages are super obtuse and require understanding of both graphics programming and the underlying apis like vulkan. They are not written for humans to understand and while useful don't meet the high bar that rustc has set. For example, this is the error message when you use a built-in variable that is only valid for vertex shaders in a fragment shader:

error: error:0:0 - [VUID-Position-Position-04318] Vulkan spec allows BuiltIn Position to be used only with Vertex, TessellationControl, TessellationEvaluation or Geometry execution models. ID <15> (OpLoad) is referencing ID <2> (OpVariable) which is decorated with BuiltIn Position in function <1> called with execution model Fragment.
         %15 = OpLoad %v4float %frag_coord

Instead of an issue this might be more a project, let me know if you want me to write a RFC with concrete suggestions and a plan to make these great.

@LegNeato LegNeato added the t: enhancement A new feature or improvement to an existing one. label Mar 26, 2024
@LegNeato
Copy link
Contributor Author

Another:

When you don't declare an entrypoint pub you get:

error: error:0:0 - No OpEntryPoint instruction was found. This is only allowed if the Linkage capability is being used.

@LegNeato
Copy link
Contributor Author

This is now Rust-GPU/rust-gpu#156

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t: enhancement A new feature or improvement to an existing one.
Projects
None yet
Development

No branches or pull requests

2 participants
@LegNeato and others