printf: extract clovers printf impl

Also make the code cleaner and simplier.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>
This commit is contained in:
Karol Herbst
2022-04-16 10:48:08 +02:00
committed by Marge Bot
parent 160aa603f5
commit aa82808645
7 changed files with 176 additions and 134 deletions
+2 -8
View File
@@ -39,6 +39,7 @@
#include "util/compiler.h"
#include "util/enum_operators.h"
#include "util/macros.h"
#include "util/u_printf.h"
#include "util/format/u_format.h"
#include "compiler/nir_types.h"
#include "compiler/shader_enums.h"
@@ -3157,13 +3158,6 @@ typedef struct {
uint8_t bit_size;
} nir_parameter;
typedef struct nir_printf_info {
unsigned num_args;
unsigned *arg_sizes;
unsigned string_size;
char *strings;
} nir_printf_info;
typedef struct nir_function {
struct exec_node node;
@@ -3732,7 +3726,7 @@ typedef struct nir_shader {
struct nir_xfb_info *xfb_info;
unsigned printf_info_count;
nir_printf_info *printf_info;
u_printf_info *printf_info;
} nir_shader;
#define nir_foreach_function(func, shader) \