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

Should nullability move inside WGPURenderPassDepthStencilAttachment? #408

Closed
Tracked by #299
kainino0x opened this issue Nov 12, 2024 · 3 comments
Closed
Tracked by #299

Comments

@kainino0x
Copy link
Collaborator

WGPURenderPassDescriptor.depthStencilAttachment is a nullable pointer. Should we instead make it an inline struct and move the nullability to .depthStencilAttachment.view?

I think the only reason not to do this would be if we expect you would ever want to set a WGPURenderPassDepthStencilAttachment without a texture view (and without any new extended fields that take its place).

@kainino0x kainino0x added the !discuss Needs discussion (at meeting or online) label Nov 12, 2024
@kainino0x kainino0x changed the title Should mutability move inside WGPURenderPassDepthStencilAttachment? Should nullability move inside WGPURenderPassDepthStencilAttachment? Nov 12, 2024
@kainino0x
Copy link
Collaborator Author

Oops, fixed typo in title.

@kainino0x
Copy link
Collaborator Author

kainino0x commented Nov 23, 2024

Nov 21 meeting:

  • KN: Avoids a pointer. More consistent with some things but also a bit less consistent with color attachments which are always behind a pointer (because it's an array). Also have to migrate people, but a bit more widely used, so maybe extra not worth the effort. (Again, not really worth it, to us.)
  • Keep this as is
  • Doc that says "defaults to" sounds like it defaults inside the API, should be clearer

Filed that under #427

@kainino0x kainino0x removed the !discuss Needs discussion (at meeting or online) label Nov 23, 2024
@kainino0x kainino0x closed this as not planned Won't fix, can't repro, duplicate, stale Nov 26, 2024
@kainino0x
Copy link
Collaborator Author

It would have also made it inconsistent with WGPUDepthStencilState unless we changed that to also have internal nullability (using .format = Undefined as a sentinel).

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

No branches or pull requests

1 participant