Vulkan: Implement occlusion queries
Begin and end queries insert an execution barrier in the command graph
to ensure the commands around them are not reordered w.r.t to the query.
Also, these commands cannot be recorded in separate secondary command
buffers. Therefore, special-function nodes are created to perform the
begin and end query calls on the final primary command buffer.
Bug: angleproject:2855
Change-Id: Ie216dfdd6a2009deaaf744fd15d2db6899dd93e9
Reviewed-on: https://chromium-review.googlesource.com/c/1259762
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
diff --git a/src/libANGLE/renderer/vulkan/RendererVk.cpp b/src/libANGLE/renderer/vulkan/RendererVk.cpp
index 3a17762..c1486d2 100644
--- a/src/libANGLE/renderer/vulkan/RendererVk.cpp
+++ b/src/libANGLE/renderer/vulkan/RendererVk.cpp
@@ -573,6 +573,10 @@
ANGLE_VK_TRY(displayVk, VerifyExtensionsPresent(deviceExtensionProps, enabledDeviceExtensions));
+ // Select additional features to be enabled
+ VkPhysicalDeviceFeatures enabledFeatures = {};
+ enabledFeatures.inheritedQueries = mPhysicalDeviceFeatures.inheritedQueries;
+
VkDeviceQueueCreateInfo queueCreateInfo = {};
float zeroPriority = 0.0f;
@@ -595,7 +599,7 @@
createInfo.enabledExtensionCount = static_cast<uint32_t>(enabledDeviceExtensions.size());
createInfo.ppEnabledExtensionNames =
enabledDeviceExtensions.empty() ? nullptr : enabledDeviceExtensions.data();
- createInfo.pEnabledFeatures = nullptr; // TODO(jmadill): features
+ createInfo.pEnabledFeatures = &enabledFeatures;
ANGLE_VK_TRY(displayVk, vkCreateDevice(mPhysicalDevice, &createInfo, nullptr, &mDevice));