aboutsummaryrefslogtreecommitdiff
path: root/layers/device_limits.cpp
diff options
context:
space:
mode:
authorChris Forbes <chrisforbes@google.com>2016-04-07 12:00:33 +1200
committerDustin Graves <dustin@lunarg.com>2016-04-08 13:55:50 -0600
commita682c89e06fc918290c1b4f4315d8b9c47a51c13 (patch)
tree325764d4dfa7ce485b935fddaf70f868ac3d7b6c /layers/device_limits.cpp
parent722dd2db6b75992387bb57f13c7c9c997c42bc60 (diff)
downloadusermoji-a682c89e06fc918290c1b4f4315d8b9c47a51c13.tar.xz
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 <chrisforbes@google.com>
Diffstat (limited to 'layers/device_limits.cpp')
-rw-r--r--layers/device_limits.cpp12
1 files changed, 8 insertions, 4 deletions
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;
}