diff --git a/src/freedreno/vulkan/tu_private.h b/src/freedreno/vulkan/tu_private.h index 3a517e4ab1b..cd8707ba817 100644 --- a/src/freedreno/vulkan/tu_private.h +++ b/src/freedreno/vulkan/tu_private.h @@ -50,52 +50,4 @@ #include "tu_util.h" #include "tu_wsi.h" -/* Whenever we generate an error, pass it through this function. Useful for - * debugging, where we can break on it. Only call at error site, not when - * propagating errors. Might be useful to plug in a stack trace here. - */ - -VkResult -__vk_startup_errorf(struct tu_instance *instance, - VkResult error, - bool force_print, - const char *file, - int line, - const char *format, - ...) PRINTFLIKE(6, 7); - -/* Prints startup errors if TU_DEBUG=startup is set or on a debug driver - * build. - */ -#define vk_startup_errorf(instance, error, format, ...) \ - __vk_startup_errorf(instance, error, \ - instance->debug_flags & TU_DEBUG_STARTUP, \ - __FILE__, __LINE__, format, ##__VA_ARGS__) - -void -__tu_finishme(const char *file, int line, const char *format, ...) - PRINTFLIKE(3, 4); - -/** - * Print a FINISHME message, including its source location. - */ -#define tu_finishme(format, ...) \ - do { \ - static bool reported = false; \ - if (!reported) { \ - __tu_finishme(__FILE__, __LINE__, format, ##__VA_ARGS__); \ - reported = true; \ - } \ - } while (0) - -#define tu_stub() \ - do { \ - tu_finishme("stub %s", __func__); \ - } while (0) - -void -tu_framebuffer_tiling_config(struct tu_framebuffer *fb, - const struct tu_device *device, - const struct tu_render_pass *pass); - #endif /* TU_PRIVATE_H */ diff --git a/src/freedreno/vulkan/tu_util.c b/src/freedreno/vulkan/tu_util.c index 9bd66efb43d..c42175ac104 100644 --- a/src/freedreno/vulkan/tu_util.c +++ b/src/freedreno/vulkan/tu_util.c @@ -21,6 +21,7 @@ * DEALINGS IN THE SOFTWARE. */ +#include "tu_util.h" #include "tu_private.h" #include diff --git a/src/freedreno/vulkan/tu_util.h b/src/freedreno/vulkan/tu_util.h index a9e47aba3c0..a93b83bd3e7 100644 --- a/src/freedreno/vulkan/tu_util.h +++ b/src/freedreno/vulkan/tu_util.h @@ -18,6 +18,54 @@ #include "vk_util.h" +/* Whenever we generate an error, pass it through this function. Useful for + * debugging, where we can break on it. Only call at error site, not when + * propagating errors. Might be useful to plug in a stack trace here. + */ + +VkResult +__vk_startup_errorf(struct tu_instance *instance, + VkResult error, + bool force_print, + const char *file, + int line, + const char *format, + ...) PRINTFLIKE(6, 7); + +/* Prints startup errors if TU_DEBUG=startup is set or on a debug driver + * build. + */ +#define vk_startup_errorf(instance, error, format, ...) \ + __vk_startup_errorf(instance, error, \ + instance->debug_flags & TU_DEBUG_STARTUP, \ + __FILE__, __LINE__, format, ##__VA_ARGS__) + +void +__tu_finishme(const char *file, int line, const char *format, ...) + PRINTFLIKE(3, 4); + +/** + * Print a FINISHME message, including its source location. + */ +#define tu_finishme(format, ...) \ + do { \ + static bool reported = false; \ + if (!reported) { \ + __tu_finishme(__FILE__, __LINE__, format, ##__VA_ARGS__); \ + reported = true; \ + } \ + } while (0) + +#define tu_stub() \ + do { \ + tu_finishme("stub %s", __func__); \ + } while (0) + +void +tu_framebuffer_tiling_config(struct tu_framebuffer *fb, + const struct tu_device *device, + const struct tu_render_pass *pass); + #define TU_STAGE_MASK ((1 << MESA_SHADER_STAGES) - 1) #define tu_foreach_stage(stage, stage_bits) \