radv: rename radv_thread_trace_set_pstate() to radv_device_set_pstate()

Setting pstate is used for RGP captures and performance counters, so
this name is more generic. Also make it non static.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17712>
This commit is contained in:
Samuel Pitoiset
2022-09-20 08:24:07 +02:00
committed by Marge Bot
parent ac8020ebfd
commit f1566ad500
2 changed files with 5 additions and 4 deletions
+4 -4
View File
@@ -7347,8 +7347,8 @@ radv_GetPhysicalDeviceFragmentShadingRatesKHR(
return vk_outarray_status(&out);
}
static bool
radv_thread_trace_set_pstate(struct radv_device *device, bool enable)
bool
radv_device_set_pstate(struct radv_device *device, bool enable)
{
struct radeon_winsys *ws = device->ws;
enum radeon_ctx_pstate pstate = enable ? RADEON_CTX_PSTATE_PEAK : RADEON_CTX_PSTATE_NONE;
@@ -7371,7 +7371,7 @@ radv_device_acquire_performance_counters(struct radv_device *device)
simple_mtx_lock(&device->pstate_mtx);
if (device->pstate_cnt == 0) {
result = radv_thread_trace_set_pstate(device, true);
result = radv_device_set_pstate(device, true);
if (result)
++device->pstate_cnt;
}
@@ -7386,7 +7386,7 @@ radv_device_release_performance_counters(struct radv_device *device)
simple_mtx_lock(&device->pstate_mtx);
if (--device->pstate_cnt == 0)
radv_thread_trace_set_pstate(device, false);
radv_device_set_pstate(device, false);
simple_mtx_unlock(&device->pstate_mtx);
}
+1
View File
@@ -943,6 +943,7 @@ struct radv_device {
bool uses_device_generated_commands;
};
bool radv_device_set_pstate(struct radv_device *device, bool enable);
bool radv_device_acquire_performance_counters(struct radv_device *device);
void radv_device_release_performance_counters(struct radv_device *device);