-
Notifications
You must be signed in to change notification settings - Fork 67
[WIP] Llvmpipe device #955
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: master
Are you sure you want to change the base?
Changes from all commits
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 |
|---|---|---|
|
|
@@ -462,8 +462,8 @@ std::unique_ptr<CVulkanPhysicalDevice> CVulkanPhysicalDevice::create(core::smart | |
| properties.limits.supportedDepthResolveModes = static_cast<nbl::hlsl::ResolveModeFlags>(vulkan12Properties.supportedDepthResolveModes); | ||
| properties.limits.supportedStencilResolveModes = static_cast<nbl::hlsl::ResolveModeFlags>(vulkan12Properties.supportedStencilResolveModes); | ||
|
|
||
| if (!vulkan12Properties.independentResolve || !vulkan12Properties.independentResolveNone) | ||
| RETURN_NULL_PHYSICAL_DEVICE; | ||
| //if (!vulkan12Properties.independentResolve || !vulkan12Properties.independentResolveNone) | ||
| // RETURN_NULL_PHYSICAL_DEVICE; | ||
|
|
||
| // not dealing with vulkan12Properties.filterMinmaxSingleComponentFormats, TODO report in usage | ||
| properties.limits.filterMinmaxImageComponentMapping = vulkan12Properties.filterMinmaxImageComponentMapping; | ||
|
|
@@ -882,8 +882,8 @@ std::unique_ptr<CVulkanPhysicalDevice> CVulkanPhysicalDevice::create(core::smart | |
| // TODO sparse stuff | ||
|
|
||
| properties.limits.variableMultisampleRate = deviceFeatures.features.variableMultisampleRate; | ||
| if (!deviceFeatures.features.inheritedQueries) | ||
| RETURN_NULL_PHYSICAL_DEVICE; | ||
| //if (!deviceFeatures.features.inheritedQueries) | ||
| // RETURN_NULL_PHYSICAL_DEVICE; | ||
|
|
||
|
|
||
| /* Vulkan 1.1 Core */ | ||
|
|
@@ -1892,6 +1892,10 @@ core::smart_refctd_ptr<ILogicalDevice> CVulkanPhysicalDevice::createLogicalDevic | |
| extensionStrings[i++] = feature.c_str(); | ||
| } | ||
|
|
||
| // remove inheritedQueries since llvmpipe doesn't support it | ||
| vk_deviceFeatures2.features.inheritedQueries = VK_FALSE; | ||
| //vk_deviceFeatures2.features = VkPhysicalDeviceFeatures{}; | ||
|
|
||
| // Create Device | ||
| VkDeviceCreateInfo vk_createInfo = { VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO }; | ||
| vk_createInfo.pNext = &vk_deviceFeatures2; | ||
|
|
@@ -1913,7 +1917,32 @@ core::smart_refctd_ptr<ILogicalDevice> CVulkanPhysicalDevice::createLogicalDevic | |
| } | ||
| vk_createInfo.queueCreateInfoCount = queueCreateInfos.size(); | ||
| vk_createInfo.pQueueCreateInfos = queueCreateInfos.data(); | ||
|
|
||
|
|
||
| // erase extensions not supported by llvm | ||
| { | ||
| core::vector<const char*> llvmUnsupportedExtensions = { | ||
| "VK_NV_shader_image_footprint", | ||
| "VK_KHR_fragment_shader_barycentric", | ||
| "VK_EXT_conservative_rasterization", | ||
| "VK_KHR_external_memory_win32", | ||
| "VK_KHR_shader_subgroup_uniform_control_flow", | ||
| "VK_EXT_pci_bus_info", | ||
| "VK_KHR_external_fence_win32", | ||
| "VK_KHR_external_semaphore_win32", | ||
| "VK_KHR_win32_keyed_mutex", | ||
| "VK_EXT_discard_rectangles" | ||
| "VK_NV_compute_shader_derivatives", | ||
| "VK_NV_shader_sm_builtins" | ||
| }; | ||
|
|
||
| for (const char* extension : llvmUnsupportedExtensions) | ||
| { | ||
| auto it = std::find_if(extensionStrings.begin(), extensionStrings.end(), [extension](const char* s) { return std::strcmp(s, extension) == 0; }); | ||
| if(it != extensionStrings.end()) | ||
| extensionStrings.erase(it); | ||
| } | ||
| } | ||
|
Comment on lines
+1921
to
+1944
Member
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. this can get removed, we achieve much better with Vulkan Configurator & Profile Layer |
||
|
|
||
| vk_createInfo.enabledExtensionCount = static_cast<uint32_t>(extensionStrings.size()); | ||
| vk_createInfo.ppEnabledExtensionNames = extensionStrings.data(); | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,7 @@ | |
| { | ||
| "type": "uint32_t", | ||
| "name": "MinMaxSSBOSize", | ||
| "value": "(0x1u << 30u) - 4" | ||
| "value": "134217728" | ||
| }, | ||
| { | ||
| "type": "uint16_t", | ||
|
|
@@ -360,7 +360,7 @@ | |
| { | ||
| "type": "uint32_t", | ||
| "name": "maxFragmentCombinedOutputResources", | ||
| "value": 127 | ||
| "value": 104 | ||
| } | ||
| ] | ||
| }, | ||
|
|
@@ -808,7 +808,7 @@ | |
| { | ||
| "type": "core::bitflag<asset::IShader::E_SHADER_STAGE>", | ||
| "name": "subgroupOpsShaderStages", | ||
| "value": "asset::IShader::E_SHADER_STAGE::ESS_COMPUTE | asset::IShader::E_SHADER_STAGE::ESS_ALL_GRAPHICS" | ||
| "value": "asset::IShader::E_SHADER_STAGE::ESS_UNKNOWN" | ||
|
Comment on lines
810
to
+811
Member
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. what does llvm-pipe report here ? |
||
| }, | ||
| { | ||
| "type": "bool", | ||
|
|
@@ -1110,7 +1110,7 @@ | |
| { | ||
| "type": "core::bitflag<RESOLVE_MODE_FLAGS>", | ||
| "name": "supportedDepthResolveModes", | ||
| "value": "RESOLVE_MODE_FLAGS::SAMPLE_ZERO_BIT | RESOLVE_MODE_FLAGS::MIN_BIT | RESOLVE_MODE_FLAGS::MAX_BIT" | ||
| "value": "RESOLVE_MODE_FLAGS::SAMPLE_ZERO_BIT" | ||
|
Comment on lines
1112
to
+1113
Member
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. if we intend to downgrade Nabla (by merging this PR) then we need to neatly handle this in renderpass creation |
||
| }, | ||
| { | ||
| "type": "core::bitflag<RESOLVE_MODE_FLAGS>", | ||
|
|
||
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.
if we intend to downgrade Nabla permamently, then we need to bring
inheritedQueriesinto the Nabla limits JSONthen check in commandbuffers that when someone is recording an execute secondary commandbuffers command in a primary cmdbuf, no queries are open unless
inheritedQuerieslimit is true