Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5563 serge 1
/*
2
 * Mesa 3-D graphics library
3
 *
4
 * Copyright (C) 1999-2007  Brian Paul   All Rights Reserved.
5
 *
6
 * Permission is hereby granted, free of charge, to any person obtaining a
7
 * copy of this software and associated documentation files (the "Software"),
8
 * to deal in the Software without restriction, including without limitation
9
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10
 * and/or sell copies of the Software, and to permit persons to whom the
11
 * Software is furnished to do so, subject to the following conditions:
12
 *
13
 * The above copyright notice and this permission notice shall be included
14
 * in all copies or substantial portions of the Software.
15
 *
16
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
19
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
 * OTHER DEALINGS IN THE SOFTWARE.
23
 */
24
 
25
 
26
#ifndef PROG_PRINT_H
27
#define PROG_PRINT_H
28
 
29
#include 
30
 
31
#include "main/glheader.h"
32
#include "main/mtypes.h"
33
 
34
struct gl_program;
35
struct gl_program_parameter_list;
36
struct gl_shader;
37
struct prog_instruction;
38
 
39
 
40
/**
41
 * The output style to use when printing programs.
42
 */
43
typedef enum {
44
   PROG_PRINT_ARB,
45
   PROG_PRINT_DEBUG
46
} gl_prog_print_mode;
47
 
48
 
49
extern const char *
50
_mesa_register_file_name(gl_register_file f);
51
 
52
extern void
53
_mesa_print_vp_inputs(GLbitfield inputs);
54
 
55
extern void
56
_mesa_print_fp_inputs(GLbitfield inputs);
57
 
58
extern const char *
59
_mesa_condcode_string(GLuint condcode);
60
 
61
extern const char *
62
_mesa_swizzle_string(GLuint swizzle, GLuint negateBase, GLboolean extended);
63
 
64
const char *
65
_mesa_writemask_string(GLuint writeMask);
66
 
67
extern void
68
_mesa_print_swizzle(GLuint swizzle);
69
 
70
extern void
71
_mesa_fprint_alu_instruction(FILE *f,
72
			     const struct prog_instruction *inst,
73
			     const char *opcode_string, GLuint numRegs,
74
			     gl_prog_print_mode mode,
75
			     const struct gl_program *prog);
76
 
77
extern void
78
_mesa_print_alu_instruction(const struct prog_instruction *inst,
79
                            const char *opcode_string, GLuint numRegs);
80
 
81
extern void
82
_mesa_print_instruction(const struct prog_instruction *inst);
83
 
84
extern GLint
85
_mesa_fprint_instruction_opt(FILE *f,
86
                            const struct prog_instruction *inst,
87
                            GLint indent,
88
                            gl_prog_print_mode mode,
89
                            const struct gl_program *prog);
90
 
91
extern GLint
92
_mesa_print_instruction_opt(const struct prog_instruction *inst, GLint indent,
93
                            gl_prog_print_mode mode,
94
                            const struct gl_program *prog);
95
 
96
extern void
97
_mesa_print_program(const struct gl_program *prog);
98
 
99
extern void
100
_mesa_fprint_program_opt(FILE *f,
101
                         const struct gl_program *prog, gl_prog_print_mode mode,
102
                         GLboolean lineNumbers);
103
 
104
extern void
105
_mesa_print_program_parameters(struct gl_context *ctx, const struct gl_program *prog);
106
 
107
extern void
108
_mesa_print_parameter_list(const struct gl_program_parameter_list *list);
109
 
110
 
111
extern void
112
_mesa_write_shader_to_file(const struct gl_shader *shader);
113
 
114
extern void
115
_mesa_append_uniforms_to_file(const struct gl_shader *shader);
116
 
117
 
118
#endif /* PROG_PRINT_H */