]>
Commit | Line | Data |
---|---|---|
45516216 | 1 | struct gl_fragment_program_state { |
2 | unsigned char _Enabled; | |
3 | struct gl_fragment_program *_TexEnvProgram; | |
4 | }; | |
5 | struct gl_shader_state { | |
6 | struct gl_shader_program *CurrentProgram; | |
7 | }; | |
8 | struct gl_constants { | |
9 | unsigned int MaxTextureUnits; | |
10 | } GLvertexformat; | |
11 | typedef struct { | |
12 | struct gl_constants Const; | |
13 | struct gl_fragment_program_state FragmentProgram; | |
14 | struct gl_shader_state Shader; | |
15 | } GLcontext; | |
16 | struct mode_opt { | |
17 | }; | |
18 | struct state_key { | |
19 | unsigned int enabled_units; | |
20 | struct { | |
21 | unsigned int NumArgsRGB:2; | |
22 | unsigned int ModeRGB:4; | |
23 | struct mode_opt OptRGB[3]; | |
24 | unsigned int ModeA:4; | |
25 | } unit[8]; | |
26 | }; | |
27 | struct ureg { | |
28 | unsigned int file:4; | |
29 | unsigned int idx:8; | |
30 | }; | |
31 | struct texenv_fragment_program { | |
32 | struct ureg src_previous; | |
33 | }; | |
34 | emit_combine(struct texenv_fragment_program *p, unsigned int mode) | |
35 | { | |
36 | if (mode) | |
37 | emit_arith(p); | |
38 | } | |
39 | struct ureg | |
40 | emit_texenv(struct texenv_fragment_program *p, | |
41 | unsigned int unit) | |
42 | { | |
43 | struct state_key *key; | |
44 | emit_combine(p, key->unit[unit].ModeRGB); | |
45 | } | |
46 | create_new_program(GLcontext *ctx) | |
47 | { | |
48 | struct texenv_fragment_program p; | |
49 | unsigned int unit; | |
50 | for (; unit < ctx->Const.MaxTextureUnits; ++unit) | |
51 | p.src_previous = emit_texenv(&p, unit); | |
52 | } | |
53 | ||
54 | _mesa_UpdateTexEnvProgram() | |
55 | { | |
56 | GLcontext *ctx; | |
57 | create_new_program(ctx); | |
58 | } |