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 WGPUVertexBufferLayout and WGPUVertexAttribute be extensible? #407

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

Should WGPUVertexBufferLayout and WGPUVertexAttribute be extensible? #407

kainino0x opened this issue Nov 12, 2024 · 3 comments · Fixed by #410
Labels
extensibility Adding features without breaking API changes

Comments

@kainino0x
Copy link
Collaborator

kainino0x commented Nov 12, 2024

@Kangz, @lokokung, and I discussed whether any of our non-extensible structs should be extensible, in particular WGPUStencilFaceState, WGPUBlendState/WGPUBlendComponent, and WGPUVertexBufferLayout/WGPUVertexAttribute.

To guess I looked at vulkan_core.h. Of these:

  • VkStencilOpState is not extensible (and these can be extended in WGPUDepthStencilState)
  • VkPipelineColorBlendAttachmentState is not extensible (and these can be extended in WGPUColorTargetState)
  • VkVertexInputBindingDescription/VkVertexInputAttributeDescription are not extensible BUT
    VkVertexInputBindingDescription2EXT (adds divisor, merging in VkPipelineVertexInputDivisorStateCreateInfoKHR?)
    and VkVertexInputAttributeDescription2EXT (adds no fields) are extensible.
    These seem to be used only in vkCmdSetVertexInputEXT, not in any pipeline descriptor, but I guess that means we should make them extensible.
@kainino0x kainino0x added !discuss Needs discussion (at meeting or online) extensibility Adding features without breaking API changes labels Nov 12, 2024
@kainino0x
Copy link
Collaborator Author

(Note the parent struct WGPUVertexState IS extensible, but since both WGPUVertexBufferLayout and WGPUVertexAttribute are in arrays, it is not nice to extend them in the parent struct.)

@kainino0x
Copy link
Collaborator Author

since both WGPUVertexBufferLayout and WGPUVertexAttribute are in arrays, it is not nice to extend them in the parent struct

IMO this is a very good reason to make them extensible.

@kainino0x
Copy link
Collaborator Author

Nov 21 meeting:

  • (very brief discussion)
  • Yes make them extensible

@kainino0x kainino0x removed the !discuss Needs discussion (at meeting or online) label Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extensibility Adding features without breaking API changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant