]> git.pld-linux.org Git - packages/Mesa.git/blob - Mesa-tgsi_dump.patch
- up to 7.8 snapshot
[packages/Mesa.git] / Mesa-tgsi_dump.patch
1 --- mesa/src/gallium/auxiliary/tgsi/tgsi_dump.c.org     2010-02-22 22:04:55.733686714 +0100
2 +++ mesa/src/gallium/auxiliary/tgsi/tgsi_dump.c 2010-02-22 22:05:07.487007669 +0100
3 @@ -47,16 +47,16 @@
4     
5     uint indentation;
6  
7 -   void (*printf)(struct dump_ctx *ctx, const char *format, ...);
8 +   void (*dump_printf)(struct dump_ctx *ctx, const char *format, ...);
9  };
10  
11  static void 
12 -dump_ctx_printf(struct dump_ctx *ctx, const char *format, ...)
13 +dump_ctx_dump_printf(struct dump_ctx *ctx, const char *format, ...)
14  {
15     va_list ap;
16     (void)ctx;
17     va_start(ap, format);
18 -   debug_vprintf(format, ap);
19 +   debug_vdump_printf(format, ap);
20     va_end(ap);
21  }
22  
23 @@ -68,19 +68,19 @@
24     uint enum_count )
25  {
26     if (e >= enum_count)
27 -      ctx->printf( ctx, "%u", e );
28 +      ctx->dump_printf( ctx, "%u", e );
29     else
30 -      ctx->printf( ctx, "%s", enums[e] );
31 +      ctx->dump_printf( ctx, "%s", enums[e] );
32  }
33  
34 -#define EOL()           ctx->printf( ctx, "\n" )
35 -#define TXT(S)          ctx->printf( ctx, "%s", S )
36 -#define CHR(C)          ctx->printf( ctx, "%c", C )
37 -#define UIX(I)          ctx->printf( ctx, "0x%x", I )
38 -#define UID(I)          ctx->printf( ctx, "%u", I )
39 -#define INSTID(I)          ctx->printf( ctx, "% 3u", I )
40 -#define SID(I)          ctx->printf( ctx, "%d", I )
41 -#define FLT(F)          ctx->printf( ctx, "%10.4f", F )
42 +#define EOL()           ctx->dump_printf( ctx, "\n" )
43 +#define TXT(S)          ctx->dump_printf( ctx, "%s", S )
44 +#define CHR(C)          ctx->dump_printf( ctx, "%c", C )
45 +#define UIX(I)          ctx->dump_printf( ctx, "0x%x", I )
46 +#define UID(I)          ctx->dump_printf( ctx, "%u", I )
47 +#define INSTID(I)          ctx->dump_printf( ctx, "% 3u", I )
48 +#define SID(I)          ctx->dump_printf( ctx, "%d", I )
49 +#define FLT(F)          ctx->dump_printf( ctx, "%10.4f", F )
50  #define ENM(E,ENUMS)    dump_enum( ctx, E, ENUMS, sizeof( ENUMS ) / sizeof( *ENUMS ) )
51  
52  static const char *processor_type_names[] =
53 @@ -369,7 +369,7 @@
54  {
55     struct dump_ctx ctx;
56  
57 -   ctx.printf = dump_ctx_printf;
58 +   ctx.dump_printf = dump_ctx_dump_printf;
59  
60     iter_declaration( &ctx.iter, (struct tgsi_full_declaration *)decl );
61  }
62 @@ -419,7 +419,7 @@
63  {
64     struct dump_ctx ctx;
65  
66 -   ctx.printf = dump_ctx_printf;
67 +   ctx.dump_printf = dump_ctx_dump_printf;
68  
69     iter_property( &ctx.iter, (struct tgsi_full_property *)prop );
70  }
71 @@ -470,7 +470,7 @@
72  {
73     struct dump_ctx ctx;
74  
75 -   ctx.printf = dump_ctx_printf;
76 +   ctx.dump_printf = dump_ctx_dump_printf;
77  
78     iter_immediate( &ctx.iter, (struct tgsi_full_immediate *)imm );
79  }
80 @@ -605,7 +605,7 @@
81  
82     ctx.instno = instno;
83     ctx.indent = 0;
84 -   ctx.printf = dump_ctx_printf;
85 +   ctx.dump_printf = dump_ctx_dump_printf;
86     ctx.indentation = 0;
87  
88     iter_instruction( &ctx.iter, (struct tgsi_full_instruction *)inst );
89 @@ -637,7 +637,7 @@
90  
91     ctx.instno = 0;
92     ctx.indent = 0;
93 -   ctx.printf = dump_ctx_printf;
94 +   ctx.dump_printf = dump_ctx_dump_printf;
95     ctx.indentation = 0;
96  
97     tgsi_iterate_shader( tokens, &ctx.iter );
98 @@ -652,7 +652,7 @@
99  };
100  
101  static void
102 -str_dump_ctx_printf(struct dump_ctx *ctx, const char *format, ...)
103 +str_dump_ctx_dump_printf(struct dump_ctx *ctx, const char *format, ...)
104  {
105     struct str_dump_ctx *sctx = (struct str_dump_ctx *)ctx;
106     
107 @@ -660,11 +660,11 @@
108        int written;
109        va_list ap;
110        va_start(ap, format);
111 -      written = util_vsnprintf(sctx->ptr, sctx->left, format, ap);
112 +      written = util_vsndump_printf(sctx->ptr, sctx->left, format, ap);
113        va_end(ap);
114  
115        /* Some complicated logic needed to handle the return value of
116 -       * vsnprintf:
117 +       * vsndump_printf:
118         */
119        if (written > 0) {
120           written = MIN2(sctx->left, written);
121 @@ -692,7 +692,7 @@
122  
123     ctx.base.instno = 0;
124     ctx.base.indent = 0;
125 -   ctx.base.printf = &str_dump_ctx_printf;
126 +   ctx.base.dump_printf = &str_dump_ctx_dump_printf;
127     ctx.base.indentation = 0;
128  
129     ctx.str = str;
This page took 0.036454 seconds and 3 git commands to generate.