mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
turnip: update tu_util.h
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17811>
This commit is contained in:
parent
e99703b515
commit
46baf86414
3 changed files with 49 additions and 48 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "tu_util.h"
|
||||
#include "tu_private.h"
|
||||
|
||||
#include <errno.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) \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue