iris: move get_time into a static in bufmgr code.

This ends up polluting the namespace if you build iris/crocus
at once, just move it to where it's used for now.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10308>
This commit is contained in:
Dave Airlie
2021-04-19 09:30:49 +10:00
parent c74d93cf01
commit a067399e37
3 changed files with 13 additions and 15 deletions

View File

@@ -101,6 +101,19 @@
#define FILE_DEBUG_FLAG DEBUG_BUFMGR
/**
* For debugging purposes, this returns a time in seconds.
*/
static double
get_time(void)
{
struct timespec tp;
clock_gettime(CLOCK_MONOTONIC, &tp);
return tp.tv_sec + tp.tv_nsec / 1000000000.0;
}
static inline int
atomic_add_unless(int *v, int add, int unless)
{

View File

@@ -36,19 +36,6 @@
#include "common/intel_defines.h"
#include "common/intel_sample_positions.h"
/**
* For debugging purposes, this returns a time in seconds.
*/
double
get_time(void)
{
struct timespec tp;
clock_gettime(CLOCK_MONOTONIC, &tp);
return tp.tv_sec + tp.tv_nsec / 1000000000.0;
}
/**
* The pipe->set_debug_callback() driver hook.
*/

View File

@@ -814,8 +814,6 @@ struct iris_context {
pipe_debug_message(dbg, PERF_INFO, __VA_ARGS__); \
} while(0)
double get_time(void);
struct pipe_context *
iris_create_context(struct pipe_screen *screen, void *priv, unsigned flags);