From af6695993ca861c1e3d59ea7898f6ca0eeb02463 Mon Sep 17 00:00:00 2001 From: Mark Lobodzinski Date: Mon, 24 Apr 2017 08:58:52 -0600 Subject: layers: Final object-type cleanup and loose ends Fixed a few DebugReport object type casts and a couple of missed spots with internal object type usage. Change-Id: Iaa8bdcf60d5ec89e1da64227f2b7367ce6c64dc1 --- layers/core_validation.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'layers/core_validation.cpp') diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 15ca79ea..fc048315 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -3020,13 +3020,14 @@ static void UpdateDrawState(layer_data *dev_data, GLOBAL_CB_NODE *cb_state, cons } // Validate HW line width capabilities prior to setting requested line width. -static bool verifyLineWidth(layer_data *dev_data, DRAW_STATE_ERROR dsError, VkDebugReportObjectTypeEXT object_type, - const uint64_t &target, float lineWidth) { +static bool verifyLineWidth(layer_data *dev_data, DRAW_STATE_ERROR dsError, VulkanObjectType object_type, const uint64_t &target, + float lineWidth) { bool skip_call = false; // First check to see if the physical device supports wide lines. if ((VK_FALSE == dev_data->enabled_features.wideLines) && (1.0f != lineWidth)) { - skip_call |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, target, __LINE__, dsError, "DS", + skip_call |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, get_debug_report_enum[object_type], target, + __LINE__, dsError, "DS", "Attempt to set lineWidth to %f but physical device wideLines feature " "not supported/enabled so lineWidth must be 1.0f!", lineWidth); @@ -3034,7 +3035,8 @@ static bool verifyLineWidth(layer_data *dev_data, DRAW_STATE_ERROR dsError, VkDe // Otherwise, make sure the width falls in the valid range. if ((dev_data->phys_dev_properties.properties.limits.lineWidthRange[0] > lineWidth) || (dev_data->phys_dev_properties.properties.limits.lineWidthRange[1] < lineWidth)) { - skip_call |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, object_type, target, __LINE__, dsError, "DS", + skip_call |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, get_debug_report_enum[object_type], target, + __LINE__, dsError, "DS", "Attempt to set lineWidth to %f but physical device limits line width " "to between [%f, %f]!", lineWidth, dev_data->phys_dev_properties.properties.limits.lineWidthRange[0], @@ -3230,7 +3232,7 @@ static bool verifyPipelineCreateState(layer_data *dev_data, std::vector(pPipeline->pipeline), + kVulkanObjectTypePipeline, reinterpret_cast(pPipeline->pipeline), pPipeline->graphicsPipelineCI.pRasterizationState->lineWidth); } @@ -7121,7 +7123,7 @@ VKAPI_ATTR void VKAPI_CALL CmdSetLineWidth(VkCommandBuffer commandBuffer, float "flag. This is undefined behavior and could be ignored. %s", validation_error_map[VALIDATION_ERROR_01476]); } else { - skip_call |= verifyLineWidth(dev_data, DRAWSTATE_INVALID_SET, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, + skip_call |= verifyLineWidth(dev_data, DRAWSTATE_INVALID_SET, kVulkanObjectTypeCommandBuffer, reinterpret_cast(commandBuffer), lineWidth); } } -- cgit v1.2.3