From d511e76a6369a2e3df50b638c9624239083fcd02 Mon Sep 17 00:00:00 2001 From: xddxd Date: Thu, 16 Sep 2021 12:17:35 +0300 Subject: [PATCH] Enable the precise occlusion query feature --- rpcs3/Emu/RSX/VK/vkutils/device.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/rpcs3/Emu/RSX/VK/vkutils/device.cpp b/rpcs3/Emu/RSX/VK/vkutils/device.cpp index 8be84fa1c6..a3f8906a6b 100644 --- a/rpcs3/Emu/RSX/VK/vkutils/device.cpp +++ b/rpcs3/Emu/RSX/VK/vkutils/device.cpp @@ -332,6 +332,11 @@ namespace vk enabled_features.shaderStorageImageWriteWithoutFormat = VK_TRUE; } + if (g_cfg.video.precise_zpass_count) + { + enabled_features.occlusionQueryPrecise = VK_TRUE; + } + // enabled_features.shaderSampledImageArrayDynamicIndexing = TRUE; // Unused currently but will be needed soon enabled_features.shaderClipDistance = VK_TRUE; // enabled_features.shaderCullDistance = VK_TRUE; // Alt notation of clip distance @@ -406,6 +411,12 @@ namespace vk enabled_features.alphaToOne = VK_FALSE; } + if (!pgpu->features.occlusionQueryPrecise && enabled_features.occlusionQueryPrecise) + { + rsx_log.error("Your GPU does not support precise occlusion queries. Graphics may not render correctly."); + enabled_features.occlusionQueryPrecise = VK_FALSE; + } + VkDeviceCreateInfo device = {}; device.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO; device.pNext = nullptr;