llvmpipe: return zero from floor_pot(zero)
[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; /* hw index, nv50 wants flat FP inputs last */
20 uint8_t id; /* tgsi index */
21
22 uint8_t mask;
23 boolean linear;
24
25 ubyte sn, si; /* semantic name & index */
26 };
27
28 struct nv50_program {
29 struct pipe_shader_state pipe;
30 struct tgsi_shader_info info;
31 boolean translated;
32
33 unsigned type;
34 struct nv50_program_exec *exec_head;
35 struct nv50_program_exec *exec_tail;
36 unsigned exec_size;
37 struct nouveau_resource *data[1];
38 unsigned data_start[1];
39
40 struct nouveau_bo *bo;
41
42 uint32_t *immd;
43 unsigned immd_nr;
44 unsigned param_nr;
45
46 struct {
47 unsigned high_temp;
48 unsigned high_result;
49
50 uint32_t attr[2];
51 uint32_t regs[4];
52
53 /* for VPs, io_nr doesn't count 'private' results (PSIZ etc.) */
54 unsigned in_nr, out_nr;
55 struct nv50_sreg4 in[PIPE_MAX_SHADER_INPUTS];
56 struct nv50_sreg4 out[PIPE_MAX_SHADER_OUTPUTS];
57
58 /* FP colour inputs, VP/GP back colour outputs */
59 struct nv50_sreg4 two_side[2];
60
61 /* GP only */
62 unsigned vert_count;
63 uint8_t prim_type;
64
65 /* VP & GP only */
66 uint8_t clpd, clpd_nr;
67 uint8_t psiz;
68 uint8_t edgeflag_in;
69
70 /* FP & GP only */
71 uint8_t prim_id;
72 } cfg;
73 };
74
75 #endif