blob: 0f1a45b30f9febeda921144855434507a94ea214 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#ifndef SLANG_LABEL_H
#define SLANG_LABEL_H 1
#include "imports.h"
#include "mtypes.h"
#include "prog_instruction.h"
struct slang_label_
{
char *Name;
GLint Location;
/**
* List of instruction references (numbered starting at zero) which need
* their BranchTarget field filled in with the location eventually
* assigned to the label.
*/
GLuint NumReferences;
GLuint *References; /** Array [NumReferences] */
};
typedef struct slang_label_ slang_label;
extern slang_label *
_slang_label_new(const char *name);
extern slang_label *
_slang_label_new_unique(const char *name);
extern void
_slang_label_delete(slang_label *l);
extern void
_slang_label_add_reference(slang_label *l, GLuint inst);
extern GLint
_slang_label_get_location(const slang_label *l);
extern void
_slang_label_set_location(slang_label *l, GLint location,
struct gl_program *prog);
#endif /* SLANG_LABEL_H */
|