nouveau: use bool instead of boolean
[mesa.git] / src / gallium / drivers / nouveau / nvc0 / nvc0_program.h
1
2 #ifndef __NVC0_PROGRAM_H__
3 #define __NVC0_PROGRAM_H__
4
5 #include "pipe/p_state.h"
6
7 #define NVC0_CAP_MAX_PROGRAM_TEMPS 128
8
9
10 struct nvc0_transform_feedback_state {
11 uint32_t stride[4];
12 uint8_t stream[4];
13 uint8_t varying_count[4];
14 uint8_t varying_index[4][128];
15 };
16
17
18 #define NVC0_SHADER_HEADER_SIZE (20 * 4)
19
20 struct nvc0_program {
21 struct pipe_shader_state pipe;
22
23 ubyte type;
24 bool translated;
25 bool need_tls;
26 uint8_t num_gprs;
27
28 uint32_t *code;
29 uint32_t *immd_data;
30 unsigned code_base;
31 unsigned code_size;
32 unsigned immd_base;
33 unsigned immd_size; /* size of immediate array data */
34 unsigned parm_size; /* size of non-bindable uniforms (c0[]) */
35
36 uint32_t hdr[20];
37 uint32_t flags[2];
38
39 struct {
40 uint32_t clip_mode; /* clip/cull selection */
41 uint8_t clip_enable; /* mask of defined clip planes */
42 uint8_t num_ucps; /* also set to max if ClipDistance is used */
43 uint8_t edgeflag; /* attribute index of edgeflag input */
44 bool need_vertex_id;
45 } vp;
46 struct {
47 uint8_t early_z;
48 uint8_t in_pos[PIPE_MAX_SHADER_INPUTS];
49 uint8_t sample_interp;
50 } fp;
51 struct {
52 uint32_t tess_mode; /* ~0 if defined by the other stage */
53 uint32_t input_patch_size;
54 } tp;
55 struct {
56 uint32_t lmem_size; /* local memory (TGSI PRIVATE resource) size */
57 uint32_t smem_size; /* shared memory (TGSI LOCAL resource) size */
58 void *syms;
59 unsigned num_syms;
60 } cp;
61 uint8_t num_barriers;
62
63 void *relocs;
64
65 struct nvc0_transform_feedback_state *tfb;
66
67 struct nouveau_heap *mem;
68 };
69
70 #endif