svga: minor reformatting of svga_texture() cast wrapper
[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 cull_enable; /* mask of defined cull distances */
43 uint8_t num_ucps; /* also set to max if ClipDistance is used */
44 uint8_t edgeflag; /* attribute index of edgeflag input */
45 bool need_vertex_id;
46 bool need_draw_parameters;
47 } vp;
48 struct {
49 uint8_t early_z;
50 uint8_t colors;
51 uint8_t color_interp[2];
52 bool sample_mask_in;
53 bool force_persample_interp;
54 bool flatshade;
55 } fp;
56 struct {
57 uint32_t tess_mode; /* ~0 if defined by the other stage */
58 uint32_t input_patch_size;
59 } tp;
60 struct {
61 uint32_t lmem_size; /* local memory (TGSI PRIVATE resource) size */
62 uint32_t smem_size; /* shared memory (TGSI LOCAL resource) size */
63 void *syms;
64 unsigned num_syms;
65 } cp;
66 uint8_t num_barriers;
67
68 void *relocs;
69 void *fixups;
70
71 struct nvc0_transform_feedback_state *tfb;
72
73 struct nouveau_heap *mem;
74 };
75
76 #endif