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

Add WGPU_MAKE_INIT_STRUCT and WGPUStringView #352

Merged
merged 4 commits into from
Sep 24, 2024

Conversation

kainino0x
Copy link
Collaborator

@kainino0x kainino0x commented Sep 24, 2024

This is basically copied from Dawn except:

  • Use NULL instead of nullptr (nullptr was added in C23)
  • Put WGPU_NULLABLE in the correct place per Nullability attributes need some love #190 so we don't forget about it later
  • Documentation! I added a few important things we did not discuss:
    • Places that accept non-nullable stringviews simply default to empty string (e.g. labels)
    • Outputs from the API always use explicit-length stringviews which may or may not be null terminated

Issue: #170 (not fixed yet, this is just the start)
(dawn bug https://crbug.com/42241188)

Copy link
Collaborator

@Kangz Kangz left a comment

Choose a reason for hiding this comment

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

LGTM!

@kainino0x kainino0x enabled auto-merge (squash) September 24, 2024 21:27
@kainino0x kainino0x merged commit 8e3a56a into webgpu-native:main Sep 24, 2024
4 checks passed
@kainino0x kainino0x deleted the stringview branch September 24, 2024 21:28
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