8000 Macos by NorbertoBurciaga · Pull Request #87 · liblava/liblava · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Macos #87

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 3 commits into from
Jun 19, 2022
Merged

Macos #87

merged 3 commits into from
Jun 19, 2022

Conversation

NorbertoBurciaga
Copy link
Contributor
  1. callback_data->pMessageIdName sometimes is a NULL string and fmt::format("validation: {} ({})", callback_data->pMessageIdName, callback_data->messageIdNumber); causes an error, so I added a validation if it is NULL only do fmt::format("validation: ({})", callback_data->messageIdNumber);
  2. The newest releases of VulkanSDK require that Apple M1 add the extension VK_KHR_portability_enumeration and a flag in create_info.flags = VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR. This code was added inside a #ifdef APPLE to not disturb Linux and/or Microsoft
  3. VK_ERROR_OUT_OF_HOST_MEMORY error is because Vulkan instance cannot be created because it is using use_custom_cpu_callbacks and the function custom_cpu_allocation is calling aligned_alloc with a size that is not a multiple of alignment and that is a requirement (MS _aligned_malloc does not have this requirement). So the size is adjusted to be a multiple of alignment for this case as follows: return aligned_alloc(alignment, ((size / alignment) + 1) * alignment);

This changes made all examples to work on MacOS

… error when callback_data->pMessageIdName is NULL.
…vers that contain devices which support the portability subset, but the portability enumeration bit was not set!. Applications that wish to enumerate portability drivers must set the VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR bit in the VkInstanceCreateInfo flags andenable the VK_KHR_portability_enumeration instance extension.
…nt. In this case, it increments the size in order to be a multiple of alignment
@TheLavaBlock TheLavaBlock added the bug Something isn't working label Jun 19, 2022
@TheLavaBlock TheLavaBlock merged commit a8e9374 into liblava:master Jun 19, 2022
@TheLavaBlock
Copy link
Member

Thanks, really appreciate it. I did a few more tests and lgtm 👍

I'm glad you were able to find and fix the problem. Let's see, maybe we'll do more with Apple M1 in the future...

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
0