Skip to content

Fix win32 #74

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

Merged
merged 5 commits into from
Aug 25, 2021
Merged

Fix win32 #74

merged 5 commits into from
Aug 25, 2021

Conversation

TheLavaBlock
Copy link
Member

@TheLavaBlock TheLavaBlock commented Aug 23, 2021

This will fix Win32 compiler errors

  • unique_data constructor
  • hex_pair hash operator
  • a lot of object_type errors:
error C2766: explicit specialization; 'lava::object_type<VkSemaphore>' has already been defined
message : see previous definition of 'object_type<unsigned __int64>'
  • GitHub Actions: build 32bit versions (Ubuntu & Windows)

@TheLavaBlock TheLavaBlock added the bug Something isn't working label Aug 23, 2021
@TheLavaBlock
Copy link
Member Author

@pezcode Do you have a good idea how to fix the object_type errors? I experimented a little with macros but without success.

Perhaps we can come up with a good solution. These Vulkan defines are really annoying.

@pezcode
Copy link
Contributor

pezcode commented Aug 24, 2021

Ugh, this mess... I don't think this is 'fixable' without creating your own wrappers for objects (for example, this is what bgfx does), but then all code would have to use those, and that's just not fun...

Practical suggestion: disable the automatic type deduction on Win32 altogether and only expose the functions with the manual VkObjectType parameter. Either with an ifdef (vulkan_core.h sets VK_USE_64_BIT_PTR_DEFINES to 0 or 1 depending on whether it's uint64_t or a unique type) or some SFINAE magic.

@TheLavaBlock
Copy link
Member Author

Thanks for your input - thought the same way: all not nice

That is why I go for a verbose approach: set_x_name and set_x_tag

Fortunately, we have a specification that remains relatively stable 🙏

@TheLavaBlock TheLavaBlock merged commit 2a97613 into liblava:master Aug 25, 2021
@TheLavaBlock TheLavaBlock deleted the fix_win32 branch August 25, 2021 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants