Skip to content

Verify debugPrintf specifiers#9641

Draft
evilpie wants to merge 37 commits into
gfx-rs:trunkfrom
evilpie:printf-verify
Draft

Verify debugPrintf specifiers#9641
evilpie wants to merge 37 commits into
gfx-rs:trunkfrom
evilpie:printf-verify

Conversation

@evilpie

@evilpie evilpie commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Connections
Depends on #9389 by @39ali

Description
C-style printf formats are a well known source of bugs. I thought it would be interesting to verify that the specifiers used in the format string matches the actual provided arguments. I tried to come up with a reasonable subset of specifiers that should work in both Metal and Vulkan.

Testing
I did some testing of format string supported on Vulkan with intel mesa drivers.

Squash or Rebase?

Rebase

Checklist

  • I self-reviewed and fully understand this PR.
  • WebGPU implementations built with wgpu may be affected behaviorally.
  • Validation and feature gates are in place to confine behavioral changes.
  • Tests demonstrate the validation and altered logic works.
  • CHANGELOG.md entries for the user-facing effects of this change are present.
  • The PR is minimal, and doesn't make sense to land as multiple PRs.
  • Commits are logically scoped and individually reviewable.
  • The PR description has enough context to understand the motivation and solution implemented.

39ali and others added 30 commits June 2, 2026 08:31
Co-authored-by: atlv <email@atlasdostal.com>
Co-authored-by: atlv <email@atlasdostal.com>
Co-authored-by: atlv <email@atlasdostal.com>
Co-authored-by: atlv <email@atlasdostal.com>
Co-authored-by: atlv <email@atlasdostal.com>
Co-authored-by: atlv <email@atlasdostal.com>
Co-authored-by: atlv <email@atlasdostal.com>
Co-authored-by: atlv <email@atlasdostal.com>
Co-authored-by: atlv <email@atlasdostal.com>
Co-authored-by: atlv <email@atlasdostal.com>
Co-authored-by: atlv <email@atlasdostal.com>
Co-authored-by: atlv <email@atlasdostal.com>
Co-authored-by: atlv <email@atlasdostal.com>
Co-authored-by: atlv <email@atlasdostal.com>
Co-authored-by: atlv <email@atlasdostal.com>
Co-authored-by: atlv <email@atlasdostal.com>
Co-authored-by: atlv <email@atlasdostal.com>
Co-authored-by: atlv <email@atlasdostal.com>
Co-authored-by: atlv <email@atlasdostal.com>
39ali and others added 7 commits June 2, 2026 08:32
Replace the debugPrintf example with an API spec, link it from the
README and crate docs, and add wgpu-gpu/Naga coverage for the extension
requirements and validation errors.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This on its own is very valuable

@evilpie evilpie Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is part of the original PR. It would probably make sense to list the supported specifiers explicitly now.

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.

3 participants