r600: don't enable depth test if there is no depth buffer
[mesa.git] / src / gallium / drivers / nv40 / nv40_state.h
1 #ifndef __NV40_STATE_H__
2 #define __NV40_STATE_H__
3
4 #include "pipe/p_state.h"
5 #include "tgsi/tgsi_scan.h"
6
7 struct nv40_sampler_state {
8 uint32_t fmt;
9 uint32_t wrap;
10 uint32_t en;
11 uint32_t filt;
12 uint32_t bcol;
13 };
14
15 struct nv40_vertex_program_exec {
16 uint32_t data[4];
17 boolean has_branch_offset;
18 int const_index;
19 };
20
21 struct nv40_vertex_program_data {
22 int index; /* immediates == -1 */
23 float value[4];
24 };
25
26 struct nv40_vertex_program {
27 struct pipe_shader_state pipe;
28
29 struct draw_vertex_shader *draw;
30
31 boolean translated;
32
33 struct pipe_clip_state ucp;
34
35 struct nv40_vertex_program_exec *insns;
36 unsigned nr_insns;
37 struct nv40_vertex_program_data *consts;
38 unsigned nr_consts;
39
40 struct nouveau_resource *exec;
41 unsigned exec_start;
42 struct nouveau_resource *data;
43 unsigned data_start;
44 unsigned data_start_min;
45
46 uint32_t ir;
47 uint32_t or;
48 uint32_t clip_ctrl;
49 struct nouveau_stateobj *so;
50 };
51
52 struct nv40_fragment_program_data {
53 unsigned offset;
54 unsigned index;
55 };
56
57 struct nv40_fragment_program {
58 struct pipe_shader_state pipe;
59 struct tgsi_shader_info info;
60
61 boolean translated;
62 unsigned samplers;
63
64 uint32_t *insn;
65 int insn_len;
66
67 struct nv40_fragment_program_data *consts;
68 unsigned nr_consts;
69
70 struct pipe_buffer *buffer;
71
72 uint32_t fp_control;
73 struct nouveau_stateobj *so;
74 };
75
76 struct nv40_miptree {
77 struct pipe_texture base;
78 struct nouveau_bo *bo;
79
80 struct pipe_buffer *buffer;
81 uint total_size;
82
83 struct {
84 uint pitch;
85 uint *image_offset;
86 } level[PIPE_MAX_TEXTURE_LEVELS];
87 };
88
89 #endif