-
Notifications
You must be signed in to change notification settings - Fork 50
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
Array function wrappers #146
Conversation
Looks pretty good!
I've been thinking, a nice refactor would be to write a custom formatter that handles some of the "casing" and namespace stripping operations.
I think that should be a separate effort, code looks good imo :) |
Please also add the Alloc versions to the Proxy wrappers |
The "Alloc" in the name should probably come before the vendor suffix, right? E.g. |
Turns out there are a lot of these functions - I added all of the core ones I could find and some common extensions, there are a lot more in extensions but most are pretty niche. Hopefully you're still alright with the decision to hardcode the list. Anyway I went ahead and made the naming change mentioned above. I can revert if you don't like it but then the capitalization will still need a fix as it was formatting as Those two things aside, should be just about good to go. There's probably some unnecessary duplicated code which I might have a go at later, along with some misc cleanup, but you can go ahead and merge if you're happy with it as is. |
I don't really mind it either way.
Ah, I didn't realize there are so many of these either. I guess the main problem is detecting which functions can be wrapped using such an allocator. Maybe it can just be done for all of the functions that can return VK_INCOMPLETE? Anyway, the changes look fine. I'm fine with merging as is, though autodetecting would be nice. Its up to you if you want to do it. |
There's also So seems like getting autodetection right will be pretty involved, and so if you're okay with the hardcoded list then IMO it's worth sticking with that, at least in the short term. Later I can dig into this some more and hopefully post a followup PR at some point. |
That seems like a good plan to me! |
Closes #145
Could probably still use a little cleanup, but I think it's getting there. Some places could be improved using string interpolation instead of calling the
render*()
functions, but the problem is they have some handling of casing, prefix stripping, etc. that would need to be duplicated or refactored in order to get the formatted names as a string. Shouldn't be too bad but not sure whether it's worth cluttering up the existing code for this, let me know if you want me to try it that way.TODO:
fill in full list of functionsadd proxy functionsupdate examplesOutput (mostly unchanged from the issue):