-
Notifications
You must be signed in to change notification settings - Fork 3
Feature/mac arm64 support #587
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
base: no_draw_indirect_count
Are you sure you want to change the base?
Changes from 5 commits
a9e0506
d15e220
10dbb2e
e1e8887
2ecabdc
af9b391
06fee35
82455ac
bf1abc9
536b435
0804443
0467abc
50b50c2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ | |
|
|
||
| #include "console/Console.hh" | ||
|
|
||
| #include <unistd.h> | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Otherwise it does not find execl and fork |
||
| #ifdef _WIN32 | ||
| #include <windows.h> | ||
| #else | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,8 +35,8 @@ namespace ecs { | |
| * A transactionId can be provided to synchronize event visibility with transactions. | ||
| * If no transactionId is provided, this event will be immediately visible to all transactions. | ||
| */ | ||
| size_t Add(const Event &event, size_t transactionId = 0) const; | ||
| size_t Add(const AsyncEvent &event) const; | ||
| uint64_t Add(const Event &event, uint64_t transactionId = 0) const; | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The impl changed but the interface didn't. No difference on linux but it is a compilation error for me. |
||
| uint64_t Add(const AsyncEvent &event) const; | ||
| static bool Poll(Lock<Read<EventInput>> lock, const EventQueueRef &queue, Event &eventOut); | ||
|
|
||
| robin_hood::unordered_map<EventName, std::vector<EventQueueWeakRef>, sp::StringHash, sp::StringEqual> events; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -238,8 +238,8 @@ namespace sp::vulkan { | |
| } | ||
|
|
||
| // currently we have code that assumes the transfer queue family is different from the other queues | ||
| Assert(queueFamilyIndex[QUEUE_TYPE_TRANSFER] != queueFamilyIndex[QUEUE_TYPE_GRAPHICS], | ||
| "transfer queue family overlaps graphics queue"); | ||
| // Assert(queueFamilyIndex[QUEUE_TYPE_TRANSFER] != queueFamilyIndex[QUEUE_TYPE_GRAPHICS], | ||
| // "transfer queue family overlaps graphics queue"); | ||
|
|
||
| std::vector<vk::DeviceQueueCreateInfo> queueInfos; | ||
| for (uint32_t i = 0; i < queueFamilies.size(); i++) { | ||
|
|
@@ -252,13 +252,12 @@ namespace sp::vulkan { | |
| queueInfos.push_back(queueInfo); | ||
| } | ||
|
|
||
| vector<const char *> enabledDeviceExtensions = { | ||
| VK_KHR_MULTIVIEW_EXTENSION_NAME, | ||
| VK_EXT_MEMORY_BUDGET_EXTENSION_NAME, | ||
| vector<const char *> enabledDeviceExtensions = {VK_KHR_MULTIVIEW_EXTENSION_NAME, | ||
| // VK_EXT_MEMORY_BUDGET_EXTENSION_NAME, | ||
| VK_KHR_SHADER_NON_SEMANTIC_INFO_EXTENSION_NAME, | ||
| VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME, | ||
| VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME, | ||
| }; | ||
| "VK_KHR_portability_subset"}; | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The const exists but for some reason compilation fails because it... does not exist? idk |
||
|
|
||
| if (enableSwapchain) { | ||
| enabledDeviceExtensions.push_back(VK_KHR_SWAPCHAIN_EXTENSION_NAME); | ||
|
|
@@ -286,14 +285,14 @@ namespace sp::vulkan { | |
| physicalDevice.getFeatures2KHR(&deviceFeatures2); | ||
|
|
||
| const auto &availableDeviceFeatures = deviceFeatures2.features; | ||
| Assert(availableDeviceFeatures.fillModeNonSolid, "device must support fillModeNonSolid"); | ||
| // Assert(availableDeviceFeatures.fillModeNonSolid, "device must support fillModeNonSolid"); | ||
| Assert(availableDeviceFeatures.samplerAnisotropy, "device must support samplerAnisotropy"); | ||
| Assert(availableDeviceFeatures.multiDrawIndirect, "device must support multiDrawIndirect"); | ||
| Assert(availableDeviceFeatures.multiViewport, "device must support multiViewport"); | ||
| Assert(availableDeviceFeatures.drawIndirectFirstInstance, "device must support drawIndirectFirstInstance"); | ||
| Assert(availableDeviceFeatures.shaderInt16, "device must support shaderInt16"); | ||
| Assert(availableDeviceFeatures.fragmentStoresAndAtomics, "device must support fragmentStoresAndAtomics"); | ||
| Assert(availableDeviceFeatures.wideLines, "device must support wideLines"); | ||
| // Assert(availableDeviceFeatures.wideLines, "device must support wideLines"); | ||
| Assert(availableVulkan11Features.multiview, "device must support multiview"); | ||
| Assert(availableVulkan11Features.shaderDrawParameters, "device must support shaderDrawParameters"); | ||
| Assert(availableVulkan11Features.storageBuffer16BitAccess, "device must support storageBuffer16BitAccess"); | ||
|
|
@@ -302,7 +301,7 @@ namespace sp::vulkan { | |
| Assert(availableVulkan12Features.shaderOutputViewportIndex, | ||
| "device must support shaderOutputViewportIndex"); | ||
| Assert(availableVulkan12Features.shaderOutputLayer, "device must support shaderOutputLayer"); | ||
| Assert(availableVulkan12Features.drawIndirectCount, "device must support drawIndirectCount"); | ||
| // Assert(availableVulkan12Features.drawIndirectCount, "device must support drawIndirectCount"); | ||
| Assert(availableVulkan12Features.runtimeDescriptorArray, "device must support runtimeDescriptorArray"); | ||
| Assert(availableVulkan12Features.descriptorBindingPartiallyBound, | ||
| "device must support descriptorBindingPartiallyBound"); | ||
|
|
@@ -316,7 +315,7 @@ namespace sp::vulkan { | |
| vk::PhysicalDeviceVulkan12Features enabledVulkan12Features; | ||
| enabledVulkan12Features.shaderOutputViewportIndex = true; | ||
| enabledVulkan12Features.shaderOutputLayer = true; | ||
| enabledVulkan12Features.drawIndirectCount = true; | ||
| enabledVulkan12Features.drawIndirectCount = false; | ||
| enabledVulkan12Features.runtimeDescriptorArray = true; | ||
| enabledVulkan12Features.descriptorBindingPartiallyBound = true; | ||
| enabledVulkan12Features.descriptorBindingVariableDescriptorCount = true; | ||
|
|
@@ -334,14 +333,14 @@ namespace sp::vulkan { | |
| enabledDeviceFeatures2.pNext = &enabledVulkan11Features; | ||
| auto &enabledDeviceFeatures = enabledDeviceFeatures2.features; | ||
| enabledDeviceFeatures.dualSrcBlend = true; | ||
| enabledDeviceFeatures.fillModeNonSolid = true; | ||
| enabledDeviceFeatures.fillModeNonSolid = false; | ||
| enabledDeviceFeatures.samplerAnisotropy = true; | ||
| enabledDeviceFeatures.multiDrawIndirect = true; | ||
| enabledDeviceFeatures.drawIndirectFirstInstance = true; | ||
| enabledDeviceFeatures.multiViewport = true; | ||
| enabledDeviceFeatures.shaderInt16 = true; | ||
| enabledDeviceFeatures.fragmentStoresAndAtomics = true; | ||
| enabledDeviceFeatures.wideLines = true; | ||
| enabledDeviceFeatures.wideLines = false; | ||
|
|
||
| vk::DeviceCreateInfo deviceInfo; | ||
| deviceInfo.queueCreateInfoCount = queueInfos.size(); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MacOS does not like the $ORIGIN
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And the /usr/local/lib is so that it finds the vulkan dylib