From 9d9bf785656ff2e7e82f98647e5875158432b2c9 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Fri, 29 Jul 2022 17:13:56 -0700 Subject: [PATCH] turnip: update tu_autotune.h Part-of: --- src/freedreno/vulkan/tu_autotune.h | 25 ++++++++++++++++++++++--- src/freedreno/vulkan/tu_private.h | 21 --------------------- 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/src/freedreno/vulkan/tu_autotune.h b/src/freedreno/vulkan/tu_autotune.h index c8954c41b0d..b9ef4a173f5 100644 --- a/src/freedreno/vulkan/tu_autotune.h +++ b/src/freedreno/vulkan/tu_autotune.h @@ -29,11 +29,9 @@ #include "util/hash_table.h" #include "util/rwlock.h" -struct tu_device; -struct tu_cmd_buffer; +#include "tu_suballoc.h" struct tu_renderpass_history; -struct tu_renderpass_result; /** * "autotune" our decisions about bypass vs GMEM rendering, based on historical @@ -113,6 +111,27 @@ struct tu_renderpass_samples { uint64_t __pad1; }; +/** + * Tracks the results from an individual renderpass. Initially created + * per renderpass, and appended to the tail of at->pending_results. At a later + * time, when the GPU has finished writing the results, we fill samples_passed. + */ +struct tu_renderpass_result { + /* Points into GPU memory */ + struct tu_renderpass_samples* samples; + + struct tu_suballoc_bo bo; + + /* + * Below here, only used internally within autotune + */ + uint64_t rp_key; + struct tu_renderpass_history *history; + struct list_head node; + uint32_t fence; + uint64_t samples_passed; +}; + VkResult tu_autotune_init(struct tu_autotune *at, struct tu_device *dev); void tu_autotune_fini(struct tu_autotune *at, struct tu_device *dev); diff --git a/src/freedreno/vulkan/tu_private.h b/src/freedreno/vulkan/tu_private.h index cc9c6e40fa3..2b7faa54b10 100644 --- a/src/freedreno/vulkan/tu_private.h +++ b/src/freedreno/vulkan/tu_private.h @@ -222,27 +222,6 @@ enum global_shader { GLOBAL_SH_COUNT, }; -/** - * Tracks the results from an individual renderpass. Initially created - * per renderpass, and appended to the tail of at->pending_results. At a later - * time, when the GPU has finished writing the results, we fill samples_passed. - */ -struct tu_renderpass_result { - /* Points into GPU memory */ - struct tu_renderpass_samples* samples; - - struct tu_suballoc_bo bo; - - /* - * Below here, only used internally within autotune - */ - uint64_t rp_key; - struct tu_renderpass_history *history; - struct list_head node; - uint32_t fence; - uint64_t samples_passed; -}; - #define TU_BORDER_COLOR_COUNT 4096 #define TU_BORDER_COLOR_BUILTIN 6