Lines Matching refs:ctx

58    void (*dump_printf)(struct dump_ctx *ctx, const char *format, ...);
62 dump_ctx_printf(struct dump_ctx *ctx, const char *format, ...)
65 (void)ctx;
67 if (ctx->file)
68 vfprintf(ctx->file, format, ap);
76 struct dump_ctx *ctx,
82 ctx->dump_printf( ctx, "%u", e );
84 ctx->dump_printf( ctx, "%s", enums[e] );
87 #define EOL() ctx->dump_printf( ctx, "\n" )
88 #define TXT(S) ctx->dump_printf( ctx, "%s", S )
89 #define CHR(C) ctx->dump_printf( ctx, "%c", C )
90 #define UIX(I) ctx->dump_printf( ctx, "0x%x", I )
91 #define UID(I) ctx->dump_printf( ctx, "%u", I )
92 #define SI64D(I) ctx->dump_printf( ctx, "%"PRId64, I )
93 #define UI64D(I) ctx->dump_printf( ctx, "%"PRIu64, I )
94 #define INSTID(I) ctx->dump_printf( ctx, "% 3u", I )
95 #define SID(I) ctx->dump_printf( ctx, "%d", I )
96 #define FLT(F) ctx->dump_printf( ctx, "%10.4f", F )
97 #define DBL(D) ctx->dump_printf( ctx, "%10.8f", D )
98 #define HFLT(F) ctx->dump_printf( ctx, "0x%08x", fui((F)) )
99 #define ENM(E,ENUMS) dump_enum( ctx, E, ENUMS, sizeof( ENUMS ) / sizeof( *ENUMS ) )
112 struct dump_ctx *ctx,
169 struct dump_ctx *ctx,
224 struct dump_ctx *ctx,
246 struct dump_ctx *ctx = (struct dump_ctx *)iter;
276 if (ctx->dump_float_as_hex)
302 struct dump_ctx *ctx = (struct dump_ctx *)iter;
345 ctx,
454 struct dump_ctx ctx;
455 memset(&ctx, 0, sizeof(ctx));
457 ctx.dump_printf = dump_ctx_printf;
459 iter_declaration( &ctx.iter, (struct tgsi_full_declaration *)decl );
468 struct dump_ctx *ctx = (struct dump_ctx *)iter;
506 struct dump_ctx ctx;
507 memset(&ctx, 0, sizeof(ctx));
509 ctx.dump_printf = dump_ctx_printf;
511 iter_property( &ctx.iter, (struct tgsi_full_property *)prop );
519 struct dump_ctx *ctx = (struct dump_ctx *) iter;
522 SID( ctx->immno++ );
538 struct dump_ctx ctx;
539 memset(&ctx, 0, sizeof(ctx));
541 ctx.dump_printf = dump_ctx_printf;
543 iter_immediate( &ctx.iter, (struct tgsi_full_immediate *)imm );
551 struct dump_ctx *ctx = (struct dump_ctx *) iter;
552 uint instno = ctx->instno++;
560 ctx->indent -= info->pre_dedent;
561 for(i = 0; (int)i < ctx->indent; ++i)
563 ctx->indent += info->post_indent;
582 _dump_register_dst( ctx, dst );
583 _dump_writemask( ctx, dst->Register.WriteMask );
600 _dump_register_src(ctx, src);
676 ctx->indentation += indent_spaces;
689 struct dump_ctx ctx;
690 memset(&ctx, 0, sizeof(ctx));
692 ctx.instno = instno;
693 ctx.immno = instno;
694 ctx.indent = 0;
695 ctx.dump_printf = dump_ctx_printf;
696 ctx.indentation = 0;
697 ctx.file = NULL;
699 iter_instruction( &ctx.iter, (struct tgsi_full_instruction *)inst );
706 struct dump_ctx *ctx = (struct dump_ctx *) iter;
713 init_dump_ctx(struct dump_ctx *ctx, uint flags)
715 memset(ctx, 0, sizeof(*ctx));
717 ctx->iter.prolog = prolog;
718 ctx->iter.iterate_instruction = iter_instruction;
719 ctx->iter.iterate_declaration = iter_declaration;
720 ctx->iter.iterate_immediate = iter_immediate;
721 ctx->iter.iterate_property = iter_property;
724 ctx->dump_float_as_hex = TRUE;
730 struct dump_ctx ctx;
731 memset(&ctx, 0, sizeof(ctx));
733 init_dump_ctx(&ctx, flags);
735 ctx.dump_printf = dump_ctx_printf;
736 ctx.file = file;
738 tgsi_iterate_shader( tokens, &ctx.iter );
757 str_dump_ctx_printf(struct dump_ctx *ctx, const char *format, ...)
759 struct str_dump_ctx *sctx = (struct str_dump_ctx *)ctx;
789 struct str_dump_ctx ctx;
790 memset(&ctx, 0, sizeof(ctx));
792 init_dump_ctx(&ctx.base, flags);
794 ctx.base.dump_printf = &str_dump_ctx_printf;
796 ctx.str = str;
797 ctx.str[0] = 0;
798 ctx.ptr = str;
799 ctx.left = (int)size;
800 ctx.nospace = false;
802 tgsi_iterate_shader( tokens, &ctx.base.iter );
804 return !ctx.nospace;
814 struct str_dump_ctx ctx;
815 memset(&ctx, 0, sizeof(ctx));
817 ctx.base.instno = instno;
818 ctx.base.immno = instno;
819 ctx.base.indent = 0;
820 ctx.base.dump_printf = &str_dump_ctx_printf;
821 ctx.base.indentation = 0;
822 ctx.base.file = NULL;
824 ctx.str = str;
825 ctx.str[0] = 0;
826 ctx.ptr = str;
827 ctx.left = (int)size;
828 ctx.nospace = false;
830 iter_instruction( &ctx.base.iter, (struct tgsi_full_instruction *)inst );