From: Dae Kim Date: Sat, 13 Feb 2016 16:03:38 +0000 (+0000) Subject: Disable robustBufferAccess in the default VkDevice to avoid performance issues on... X-Git-Tag: upstream/0.1.0~812^2~46^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b615f4616905bb2d90f3f42f402cc285c6490571;p=platform%2Fupstream%2FVK-GL-CTS.git Disable robustBufferAccess in the default VkDevice to avoid performance issues on some HW --- diff --git a/external/vulkancts/modules/vulkan/vktTestCase.cpp b/external/vulkancts/modules/vulkan/vktTestCase.cpp index 6f33b8411..693873f64 100644 --- a/external/vulkancts/modules/vulkan/vktTestCase.cpp +++ b/external/vulkancts/modules/vulkan/vktTestCase.cpp @@ -108,6 +108,8 @@ public: VkQueue getUniversalQueue (void) const; private: + static VkPhysicalDeviceFeatures filterDefaultDeviceFeatures (const VkPhysicalDeviceFeatures& deviceFeatures); + const Unique m_instance; const InstanceDriver m_instanceInterface; @@ -126,7 +128,7 @@ DefaultDevice::DefaultDevice (const PlatformInterface& vkPlatform, const tcu::Co , m_instanceInterface (vkPlatform, *m_instance) , m_physicalDevice (chooseDevice(m_instanceInterface, *m_instance, cmdLine)) , m_universalQueueFamilyIndex (findQueueFamilyIndexWithCaps(m_instanceInterface, m_physicalDevice, VK_QUEUE_GRAPHICS_BIT|VK_QUEUE_COMPUTE_BIT)) - , m_deviceFeatures (getPhysicalDeviceFeatures(m_instanceInterface, m_physicalDevice)) // \note All supported features are enabled + , m_deviceFeatures (filterDefaultDeviceFeatures(getPhysicalDeviceFeatures(m_instanceInterface, m_physicalDevice))) , m_deviceProperties (getPhysicalDeviceProperties(m_instanceInterface, m_physicalDevice)) // \note All supported features are enabled , m_device (createDefaultDevice(m_instanceInterface, m_physicalDevice, m_universalQueueFamilyIndex, m_deviceFeatures)) , m_deviceInterface (m_instanceInterface, *m_device) @@ -144,6 +146,16 @@ VkQueue DefaultDevice::getUniversalQueue (void) const return queue; } +VkPhysicalDeviceFeatures DefaultDevice::filterDefaultDeviceFeatures (const VkPhysicalDeviceFeatures& deviceFeatures) +{ + VkPhysicalDeviceFeatures enabledDeviceFeatures = deviceFeatures; + + // Disable robustness by default, as it has an impact on performance on some HW. + enabledDeviceFeatures.robustBufferAccess = false; + + return enabledDeviceFeatures; +} + // Allocator utilities vk::Allocator* createAllocator (DefaultDevice* device)