radv: change the default value of RADV_TRACE_CACHE_COUNTERS on < GFX10
To not print a warning about missing SPM by default on < GFX10. Also move the function to radv_physical_device.c and make it non-static. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39065>
This commit is contained in:
committed by
Marge Bot
parent
7219411f78
commit
e03461f3bd
@@ -68,13 +68,6 @@ typedef void *drmDevicePtr;
|
||||
#include "ac_descriptors.h"
|
||||
#include "ac_formats.h"
|
||||
|
||||
static bool
|
||||
radv_spm_trace_enabled(const struct radv_instance *instance)
|
||||
{
|
||||
return (instance->vk.trace_mode & RADV_TRACE_MODE_RGP) &&
|
||||
debug_get_bool_option("RADV_THREAD_TRACE_CACHE_COUNTERS", true);
|
||||
}
|
||||
|
||||
static bool
|
||||
radv_trap_handler_enabled()
|
||||
{
|
||||
@@ -603,10 +596,10 @@ radv_device_init_rgp(struct radv_device *device)
|
||||
"radv: Thread trace support is enabled (initial buffer size: %u MiB, "
|
||||
"instruction timing: %s, cache counters: %s, queue events: %s).\n",
|
||||
device->sqtt.buffer_size / (1024 * 1024), radv_is_instruction_timing_enabled() ? "enabled" : "disabled",
|
||||
radv_spm_trace_enabled(instance) ? "enabled" : "disabled",
|
||||
radv_spm_trace_enabled(pdev) ? "enabled" : "disabled",
|
||||
radv_sqtt_queue_events_enabled() ? "enabled" : "disabled");
|
||||
|
||||
if (radv_spm_trace_enabled(instance)) {
|
||||
if (radv_spm_trace_enabled(pdev)) {
|
||||
if (pdev->info.gfx_level >= GFX10 && pdev->info.gfx_level <= GFX12 && pdev->info.gfx_level != GFX11_5) {
|
||||
if (!radv_spm_init(device))
|
||||
return VK_ERROR_INITIALIZATION_FAILED;
|
||||
|
||||
@@ -75,6 +75,15 @@ radv_taskmesh_enabled(const struct radv_physical_device *pdev)
|
||||
pdev->info.has_gang_submit;
|
||||
}
|
||||
|
||||
bool
|
||||
radv_spm_trace_enabled(const struct radv_physical_device *pdev)
|
||||
{
|
||||
const struct radv_instance *instance = radv_physical_device_instance(pdev);
|
||||
|
||||
return (instance->vk.trace_mode & RADV_TRACE_MODE_RGP) &&
|
||||
debug_get_bool_option("RADV_THREAD_TRACE_CACHE_COUNTERS", pdev->info.gfx_level >= GFX10);
|
||||
}
|
||||
|
||||
bool
|
||||
radv_sparse_enabled(const struct radv_physical_device *pdev)
|
||||
{
|
||||
|
||||
@@ -318,6 +318,8 @@ bool radv_transfer_queue_enabled(const struct radv_physical_device *pdev);
|
||||
|
||||
bool radv_compute_queue_enabled(const struct radv_physical_device *pdev);
|
||||
|
||||
bool radv_spm_trace_enabled(const struct radv_physical_device *pdev);
|
||||
|
||||
static inline uint32_t
|
||||
radv_get_sampled_image_desc_size(const struct radv_physical_device *pdev)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user