mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 04:30:10 +01:00
radv: move SQTT parameters initialization to radv_thread_trace_init()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9097>
This commit is contained in:
parent
388bde7e82
commit
09b23c42f9
3 changed files with 13 additions and 10 deletions
|
|
@ -2636,7 +2636,7 @@ radv_device_init_gs_info(struct radv_device *device)
|
|||
device->physical_device->rad_info.family);
|
||||
}
|
||||
|
||||
static int
|
||||
int
|
||||
radv_get_int_debug_option(const char *name, int default_value)
|
||||
{
|
||||
const char *str;
|
||||
|
|
@ -2984,15 +2984,6 @@ VkResult radv_CreateDevice(
|
|||
abort();
|
||||
}
|
||||
|
||||
/* Default buffer size set to 1MB per SE. */
|
||||
device->thread_trace.buffer_size =
|
||||
radv_get_int_debug_option("RADV_THREAD_TRACE_BUFFER_SIZE", 1024 * 1024);
|
||||
device->thread_trace.start_frame = radv_get_int_debug_option("RADV_THREAD_TRACE", -1);
|
||||
|
||||
const char *trigger_file = getenv("RADV_THREAD_TRACE_TRIGGER");
|
||||
if (trigger_file)
|
||||
device->thread_trace.trigger_file = strdup(trigger_file);
|
||||
|
||||
if (!radv_thread_trace_init(device))
|
||||
goto fail;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1191,6 +1191,9 @@ radv_get_debug_option_name(int id);
|
|||
const char *
|
||||
radv_get_perftest_option_name(int id);
|
||||
|
||||
int
|
||||
radv_get_int_debug_option(const char *name, int default_value);
|
||||
|
||||
struct radv_color_buffer_info {
|
||||
uint64_t cb_color_base;
|
||||
uint64_t cb_color_cmask;
|
||||
|
|
|
|||
|
|
@ -430,6 +430,15 @@ radv_thread_trace_init_bo(struct radv_device *device)
|
|||
bool
|
||||
radv_thread_trace_init(struct radv_device *device)
|
||||
{
|
||||
/* Default buffer size set to 1MB per SE. */
|
||||
device->thread_trace.buffer_size =
|
||||
radv_get_int_debug_option("RADV_THREAD_TRACE_BUFFER_SIZE", 1024 * 1024);
|
||||
device->thread_trace.start_frame = radv_get_int_debug_option("RADV_THREAD_TRACE", -1);
|
||||
|
||||
const char *trigger_file = getenv("RADV_THREAD_TRACE_TRIGGER");
|
||||
if (trigger_file)
|
||||
device->thread_trace.trigger_file = strdup(trigger_file);
|
||||
|
||||
if (!radv_thread_trace_init_bo(device))
|
||||
return false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue