nvfx: so->RING_3D: fragprog
[mesa.git] / src / gallium / drivers / nvfx / nvfx_state.h
1 #ifndef __NVFX_STATE_H__
2 #define __NVFX_STATE_H__
3
4 #include "pipe/p_state.h"
5 #include "tgsi/tgsi_scan.h"
6 #include "nouveau/nouveau_statebuf.h"
7
8 struct nvfx_vertex_program_exec {
9 uint32_t data[4];
10 boolean has_branch_offset;
11 int const_index;
12 };
13
14 struct nvfx_vertex_program_data {
15 int index; /* immediates == -1 */
16 float value[4];
17 };
18
19 struct nvfx_vertex_program {
20 struct pipe_shader_state pipe;
21
22 struct draw_vertex_shader *draw;
23
24 boolean translated;
25
26 struct pipe_clip_state ucp;
27
28 struct nvfx_vertex_program_exec *insns;
29 unsigned nr_insns;
30 struct nvfx_vertex_program_data *consts;
31 unsigned nr_consts;
32
33 struct nouveau_resource *exec;
34 unsigned exec_start;
35 struct nouveau_resource *data;
36 unsigned data_start;
37 unsigned data_start_min;
38
39 uint32_t ir;
40 uint32_t or;
41 uint32_t clip_ctrl;
42 struct nouveau_stateobj *so;
43 };
44
45 struct nvfx_fragment_program_data {
46 unsigned offset;
47 unsigned index;
48 };
49
50 struct nvfx_fragment_program {
51 struct pipe_shader_state pipe;
52 struct tgsi_shader_info info;
53
54 boolean translated;
55 unsigned samplers;
56
57 uint32_t *insn;
58 int insn_len;
59
60 struct nvfx_fragment_program_data *consts;
61 unsigned nr_consts;
62
63 /* XXX: just use a nouveau_bo for this?
64 */
65 struct pipe_resource *buffer;
66
67 uint32_t fp_control;
68 };
69
70
71 #endif