layers:Use ptr to cmd buffer object in log_msg
authorTobin Ehlis <tobine@google.com>
Mon, 21 Nov 2016 22:15:52 +0000 (15:15 -0700)
committerTobin Ehlis <tobine@google.com>
Tue, 22 Nov 2016 20:20:46 +0000 (13:20 -0700)
This new error was incorrectly referencing the ptr to the cb_node,
which is internal validation state, instead of the cmd buffer object
that the node wraps.

layers/core_validation.cpp

index a8a0a85..f57a403 100644 (file)
@@ -6390,8 +6390,9 @@ void invalidateCommandBuffers(const layer_data *dev_data, std::unordered_set<GLO
     for (auto cb_node : cb_nodes) {
         if (cb_node->state == CB_RECORDING) {
             log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT,
-                    (uint64_t)(cb_node), __LINE__, DRAWSTATE_INVALID_COMMAND_BUFFER, "DS",
-                    "Invalidating a command buffer that's currently being recorded: 0x%" PRIx64 ".", (uint64_t)(cb_node));
+                    (uint64_t)(cb_node->commandBuffer), __LINE__, DRAWSTATE_INVALID_COMMAND_BUFFER, "DS",
+                    "Invalidating a command buffer that's currently being recorded: 0x%" PRIx64 ".",
+                    (uint64_t)(cb_node->commandBuffer));
         }
         cb_node->state = CB_INVALID;
         cb_node->broken_bindings.push_back(obj);