Skip to content

Add shader debug labels#7

Open
stefnotch wants to merge 1 commit into
mainfrom
debug-labels
Open

Add shader debug labels#7
stefnotch wants to merge 1 commit into
mainfrom
debug-labels

Conversation

@stefnotch
Copy link
Copy Markdown
Collaborator

This adds debug labels to the shaders. Some error messages are better now, like this one

grafik

Improvements needde
But honestly, those messages are still quite subpar.

  • Chrome: I don't understand why ""add"" has so many quotes
  • Firefox: Prints multiple seemingly duplicated error messages. And the error message with the shader code is collapsed by default.

And neither of them have a clicky clicky. I wish I could at least get to the createShaderModule call that failed.

More debug labels needed?
If any of the messages only involve the pipeline, and not the shader, then the error messages are near useless. Chrome at least includes the name of the shader module, while Firefox does not.

grafik

Bonus
It is possible, with some sorcery, to make the error messages a lot better and clickable. Should we integrate that?
https://mastodon.social/@stefnotch/114137784233419891

Copy link
Copy Markdown
Owner

@Welko Welko left a comment

Choose a reason for hiding this comment

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

Thanks!


clicky clicky

lol

More debug labels needed?

I'd say yes. We should probably label everything we can

It is possible, with some sorcery, to make the error messages a lot better and clickable. Should we integrate that?

That's really cool! Nice job. How much effort would that be? It should go in a separate PR though

@stefnotch
Copy link
Copy Markdown
Collaborator Author

stefnotch commented Oct 26, 2025

It shouldn't be too much effort (~30 minutes), since I can just port it from another project.
It does, however, add one file with very special and hacky code.

I'll try to make a PR for it today

@stefnotch
Copy link
Copy Markdown
Collaborator Author

Update: No PR today, I ended up spending all my time on wgsl-analyzer. Hopefully I can do it next week

@stefnotch
Copy link
Copy Markdown
Collaborator Author

stefnotch commented Oct 27, 2025

Okay, I took a look at it. It depends on an npm library for the source map generation. I could either copy-paste that library into rtvis, or we could wait for #13 . Waiting has the upside of being less work and causing fewer merge conflicts, so seeing as how we aren't in a rush, I'm inclined to do that.

@stefnotch
Copy link
Copy Markdown
Collaborator Author

stefnotch commented Oct 31, 2025

Here's a relevant Firefox upstream bug https://bugzilla.mozilla.org/show_bug.cgi?id=1844709 and here is another one https://bugzilla.mozilla.org/show_bug.cgi?id=1827953

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