summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>2019-07-04 21:55:49 +0300
committerJuan A. Suarez Romero <jasuarez@igalia.com>2019-07-09 10:09:07 +0000
commit5666f3b89154d95924451febf3563c83d161890c (patch)
tree0ac5119f67f562cf0a78d1a4d405e425a5f90a2b
parente42399f4de80acb681b90ae4e35d8983b89d0329 (diff)
downloadmesa-5666f3b89154d95924451febf3563c83d161890c.tar.gz
vulkan/overlay: fix command buffer stats
Begin/Reset of command buffer both reset the content of the command buffer. Don't forget to wipe them on Begin. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Fixes: 4438188f492e1f ("vulkan/overlay: record stats in command buffers and accumulate on exec/submit") Acked-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> (cherry picked from commit 8f0f727fe4274e222b5a8118c5cb3c7f8cad3d7c)
-rw-r--r--src/vulkan/overlay-layer/overlay.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vulkan/overlay-layer/overlay.cpp b/src/vulkan/overlay-layer/overlay.cpp
index 5b761eefc8a..4e5c50e2ad7 100644
--- a/src/vulkan/overlay-layer/overlay.cpp
+++ b/src/vulkan/overlay-layer/overlay.cpp
@@ -1857,6 +1857,8 @@ static VkResult overlay_BeginCommandBuffer(
struct command_buffer_data *cmd_buffer_data = FIND_CMD_BUFFER_DATA(commandBuffer);
struct device_data *device_data = cmd_buffer_data->device;
+ memset(&cmd_buffer_data->stats, 0, sizeof(cmd_buffer_data->stats));
+
/* We don't record any query in secondary command buffers, just make sure
* we have the right inheritance.
*/