From b219adcede7e27d1e248dc5313bad00e8b418777 Mon Sep 17 00:00:00 2001 From: Tony Barbour Date: Fri, 25 Mar 2016 13:04:20 -0600 Subject: [PATCH] layers: DL - Get inheritedQueries support from physical device features Change-Id: I6f9c045d6154d2c08aa2516caf8e250dcef22e84 --- layers/device_limits.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/layers/device_limits.cpp b/layers/device_limits.cpp index ff761f6..f0812e2 100644 --- a/layers/device_limits.cpp +++ b/layers/device_limits.cpp @@ -508,14 +508,15 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkBeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo *pBeginInfo) { bool skipCall = false; layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); + layer_data *phy_dev_data = get_my_data_ptr(get_dispatch_key(dev_data->physicalDevice), layer_data_map); const VkCommandBufferInheritanceInfo *pInfo = pBeginInfo->pInheritanceInfo; - if (dev_data->actualPhysicalDeviceFeatures.inheritedQueries == VK_FALSE && pInfo && pInfo->occlusionQueryEnable != VK_FALSE) { + if (phy_dev_data->actualPhysicalDeviceFeatures.inheritedQueries == VK_FALSE && pInfo && pInfo->occlusionQueryEnable != VK_FALSE) { skipCall |= log_msg( dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, reinterpret_cast(commandBuffer), __LINE__, DEVLIMITS_INVALID_INHERITED_QUERY, "DL", "Cannot set inherited occlusionQueryEnable in vkBeginCommandBuffer() when device does not support inheritedQueries."); } - if (dev_data->actualPhysicalDeviceFeatures.inheritedQueries != VK_FALSE && pInfo && pInfo->occlusionQueryEnable != VK_FALSE && + if (phy_dev_data->actualPhysicalDeviceFeatures.inheritedQueries != VK_FALSE && pInfo && pInfo->occlusionQueryEnable != VK_FALSE && !validate_VkQueryControlFlagBits(VkQueryControlFlagBits(pInfo->queryFlags))) { skipCall |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, reinterpret_cast(commandBuffer), __LINE__, DEVLIMITS_INVALID_INHERITED_QUERY, "DL", -- 2.7.4