Enable occlusionQueryPrecise Swiftshader already counts all the fragments for this feature, it just needed to be enabled in VkPhysicalDevice.cpp. The occlusion_query tests that remain unsupported require VK_EXT_host_query_reset. This is unsupported in SwiftShader as of now, though it is required for Vulkan 1.2 conformance. Bug: b/148241855 Tests: dEQP-VK.query_pool.occlusion_query.* Change-Id: Ib03df4225ed49865c648368ebf0547bfc3d117f7 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/47148 Reviewed-by: Nicolas Capens <nicolascapens@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by: Sean Risser <srisser@google.com>
diff --git a/src/Vulkan/VkPhysicalDevice.cpp b/src/Vulkan/VkPhysicalDevice.cpp index 39b56e2..f53c326 100644 --- a/src/Vulkan/VkPhysicalDevice.cpp +++ b/src/Vulkan/VkPhysicalDevice.cpp
@@ -91,7 +91,7 @@ VK_FALSE, // textureCompressionASTC_LDR #endif VK_TRUE, // textureCompressionBC - VK_FALSE, // occlusionQueryPrecise + VK_TRUE, // occlusionQueryPrecise VK_FALSE, // pipelineStatisticsQuery VK_TRUE, // vertexPipelineStoresAndAtomics VK_TRUE, // fragmentStoresAndAtomics
diff --git a/src/Vulkan/VkQueryPool.cpp b/src/Vulkan/VkQueryPool.cpp index b313620..2105608 100644 --- a/src/Vulkan/VkQueryPool.cpp +++ b/src/Vulkan/VkQueryPool.cpp
@@ -192,7 +192,8 @@ { ASSERT(query < count); - if(flags != 0) + // Only accept flags with valid bits set. + if(flags & ~(VK_QUERY_CONTROL_PRECISE_BIT)) { UNSUPPORTED("vkCmdBeginQuery::flags %d", int(flags)); }