~ubuntu-branches/ubuntu/jaunty/mesa/jaunty

« back to all changes in this revision

Viewing changes to src/mesa/shader/slang/slang_compile_function.h

  • Committer: Bazaar Package Importer
  • Author(s): Timo Aaltonen
  • Date: 2009-01-23 10:20:24 UTC
  • mfrom: (1.2.14 upstream)
  • Revision ID: james.westby@ubuntu.com-20090123102024-1f3kmb3aea7wzk67
Tags: 7.3~rc3-1ubuntu1
* Merge with Debian experimental.
* Drop 102_dont_vblank.patch, since the new drm code in the kernel
  fixes the bugs that it worked around.
* Bump the build-dependency of libdrm to 2.4.4. It's the first version
  with necessary changes to build this.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#define SLANG_COMPILE_FUNCTION_H
27
27
 
28
28
 
29
 
struct slang_code_unit_;
30
 
 
31
29
/**
32
30
 * Types of functions.
33
31
 */
40
38
 
41
39
 
42
40
/**
43
 
 * When we need to fill in addresses which we won't know until the future,
44
 
 * we keep track of them with a fix-up table.
45
 
 */
46
 
typedef struct slang_fixup_table_
47
 
{
48
 
   GLuint *table;     /**< array[count] of addresses */
49
 
   GLuint count;
50
 
} slang_fixup_table;
51
 
 
52
 
extern void slang_fixup_table_init(slang_fixup_table *);
53
 
extern void slang_fixup_table_free(slang_fixup_table *);
54
 
extern GLboolean slang_fixup_save(slang_fixup_table *fixups, GLuint address);
55
 
 
56
 
 
57
 
/**
58
41
 * Description of a compiled shader function.
59
42
 */
60
43
typedef struct slang_function_
64
47
   slang_variable_scope *parameters; /**< formal parameters AND local vars */
65
48
   unsigned int param_count;   /**< number of formal params (no locals) */
66
49
   slang_operation *body;      /**< The instruction tree */
67
 
   unsigned int address;       /**< Address of this func in memory */
68
 
   slang_fixup_table fixups;   /**< Mem locations which need func's address */
69
50
} slang_function;
70
51
 
71
52
extern int slang_function_construct(slang_function *);
72
53
extern void slang_function_destruct(slang_function *);
 
54
extern slang_function *slang_function_new(slang_function_kind kind);
 
55
 
 
56
extern GLboolean
 
57
_slang_function_has_return_value(const slang_function *fun);
73
58
 
74
59
 
75
60
/**
89
74
extern void
90
75
slang_function_scope_destruct(slang_function_scope *);
91
76
 
92
 
extern GLboolean
93
 
_slang_function_has_return_value(const slang_function *fun);
94
 
 
95
77
extern int
96
78
slang_function_scope_find_by_name(slang_function_scope *, slang_atom, int);
97
79
 
98
80
extern slang_function *
99
81
slang_function_scope_find(slang_function_scope *, slang_function *, int);
100
82
 
 
83
extern struct slang_function_ *
 
84
_slang_function_locate(const struct slang_function_scope_ *funcs,
 
85
                       slang_atom name, struct slang_operation_ *params,
 
86
                       GLuint num_params,
 
87
                       const struct slang_name_space_ *space,
 
88
                       slang_atom_pool *atoms, slang_info_log *log,
 
89
                       GLboolean *error);
 
90
 
 
91
 
101
92
#endif /* SLANG_COMPILE_FUNCTION_H */