From 4070e4cb55b216af4df0b7b2607271a917988bf4 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Thu, 24 Nov 2016 14:45:16 +1300 Subject: layers: Fix broken use of phys device as device dispatch key This made no sense. The physical device's dispatch key is the same as the instance. Signed-off-by: Chris Forbes --- layers/parameter_validation.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'layers/parameter_validation.cpp') diff --git a/layers/parameter_validation.cpp b/layers/parameter_validation.cpp index 20884a16..078a0aa6 100644 --- a/layers/parameter_validation.cpp +++ b/layers/parameter_validation.cpp @@ -3826,12 +3826,10 @@ VKAPI_ATTR void VKAPI_CALL FreeCommandBuffers(VkDevice device, VkCommandPool com bool PreBeginCommandBuffer(layer_data *dev_data, VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo *pBeginInfo) { bool skip = false; - // TODO: this makes no sense. - layer_data *phy_dev_data = get_my_data_ptr(get_dispatch_key(dev_data->physical_device), layer_data_map); const VkCommandBufferInheritanceInfo *pInfo = pBeginInfo->pInheritanceInfo; if (pInfo != NULL) { - if ((phy_dev_data->physical_device_features.inheritedQueries == VK_FALSE) && (pInfo->occlusionQueryEnable != VK_FALSE)) { + if ((dev_data->physical_device_features.inheritedQueries == VK_FALSE) && (pInfo->occlusionQueryEnable != VK_FALSE)) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, reinterpret_cast(commandBuffer), __LINE__, DEVICE_FEATURE, LayerName, @@ -3839,7 +3837,7 @@ bool PreBeginCommandBuffer(layer_data *dev_data, VkCommandBuffer commandBuffer, "inheritedQueries."); } - if ((phy_dev_data->physical_device_features.inheritedQueries != VK_FALSE) && (pInfo->occlusionQueryEnable != VK_FALSE) && + if ((dev_data->physical_device_features.inheritedQueries != VK_FALSE) && (pInfo->occlusionQueryEnable != VK_FALSE) && (!validate_VkQueryControlFlagBits(VkQueryControlFlagBits(pInfo->queryFlags)))) { skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, -- cgit v1.2.3