From a682c89e06fc918290c1b4f4315d8b9c47a51c13 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Thu, 7 Apr 2016 12:00:33 +1200 Subject: layers: Use real enum value for alignment checks in device_limits Previously this used '1'. Also clean up the enum, and description of device_limits checks. Found by inspection while reviewing #290. Change-Id: I710d9b8fad0ca027eb3de67b6c2c70b5628af5a5 Signed-off-by: Chris Forbes --- layers/device_limits.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'layers/device_limits.cpp') diff --git a/layers/device_limits.cpp b/layers/device_limits.cpp index 44a891b1..a3ba1f13 100644 --- a/layers/device_limits.cpp +++ b/layers/device_limits.cpp @@ -619,7 +619,8 @@ VK_LAYER_EXPORT VKAPI_ATTR void VKAPI_CALL vkCmdUpdateBuffer(VkCommandBuffer com // dstOffset is the byte offset into the buffer to start updating and must be a multiple of 4. if (dstOffset & 3) { layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); - if (log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, 1, "DL", + if (log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VkDebugReportObjectTypeEXT(0), 0, __LINE__, + DEVLIMITS_INVALID_BUFFER_UPDATE_ALIGNMENT, "DL", "vkCmdUpdateBuffer parameter, VkDeviceSize dstOffset, is not a multiple of 4")) { return; } @@ -628,7 +629,8 @@ VK_LAYER_EXPORT VKAPI_ATTR void VKAPI_CALL vkCmdUpdateBuffer(VkCommandBuffer com // dataSize is the number of bytes to update, which must be a multiple of 4. if (dataSize & 3) { layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); - if (log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, 1, "DL", + if (log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VkDebugReportObjectTypeEXT(0), 0, __LINE__, + DEVLIMITS_INVALID_BUFFER_UPDATE_ALIGNMENT, "DL", "vkCmdUpdateBuffer parameter, VkDeviceSize dataSize, is not a multiple of 4")) { return; } @@ -644,7 +646,8 @@ vkCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize // dstOffset is the byte offset into the buffer to start filling and must be a multiple of 4. if (dstOffset & 3) { layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); - if (log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, 1, "DL", + if (log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VkDebugReportObjectTypeEXT(0), 0, __LINE__, + DEVLIMITS_INVALID_BUFFER_UPDATE_ALIGNMENT, "DL", "vkCmdFillBuffer parameter, VkDeviceSize dstOffset, is not a multiple of 4")) { return; } @@ -653,7 +656,8 @@ vkCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize // size is the number of bytes to fill, which must be a multiple of 4. if (size & 3) { layer_data *my_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map); - if (log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__, 1, "DL", + if (log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VkDebugReportObjectTypeEXT(0), 0, __LINE__, + DEVLIMITS_INVALID_BUFFER_UPDATE_ALIGNMENT, "DL", "vkCmdFillBuffer parameter, VkDeviceSize size, is not a multiple of 4")) { return; } -- cgit v1.2.3