Remove grammar module -- no dependencies left.
[mesa.git] / src / gallium / drivers / nv50 / nv50_program.h
1 #ifndef __NV50_PROGRAM_H__
2 #define __NV50_PROGRAM_H__
3
4 #include "pipe/p_state.h"
5 #include "tgsi/tgsi_scan.h"
6
7 struct nv50_program_exec {
8 struct nv50_program_exec *next;
9
10 unsigned inst[2];
11 struct {
12 int index;
13 unsigned mask;
14 unsigned shift;
15 } param;
16 };
17
18 struct nv50_sreg4 {
19 uint8_t hw;
20 uint8_t id; /* tgsi index, nv50 needs them sorted: flat ones last */
21
22 uint8_t mask;
23 boolean linear;
24 };
25
26 struct nv50_program {
27 struct pipe_shader_state pipe;
28 struct tgsi_shader_info info;
29 boolean translated;
30
31 unsigned type;
32 struct nv50_program_exec *exec_head;
33 struct nv50_program_exec *exec_tail;
34 unsigned exec_size;
35 struct nouveau_resource *data[1];
36 unsigned data_start[1];
37
38 struct nouveau_bo *bo;
39
40 float *immd;
41 unsigned immd_nr;
42 unsigned param_nr;
43
44 struct {
45 unsigned high_temp;
46 unsigned high_result;
47
48 uint32_t attr[2];
49 uint32_t regs[4];
50
51 /* for VPs, io_nr doesn't count 'private' results (PSIZ etc.) */
52 unsigned io_nr;
53 struct nv50_sreg4 io[PIPE_MAX_SHADER_OUTPUTS];
54
55 /* FP colour inputs, VP/GP back colour outputs */
56 struct nv50_sreg4 two_side[2];
57
58 /* VP only */
59 uint8_t clpd, clpd_nr;
60 uint8_t psiz;
61 } cfg;
62 };
63
64 #endif