Merge branch 'mesa_7_7_branch'
[mesa.git] / src / gallium / drivers / nv04 / nv04_state.h
1 #ifndef __NV04_STATE_H__
2 #define __NV04_STATE_H__
3
4 #include "pipe/p_state.h"
5 #include "tgsi/tgsi_scan.h"
6
7 struct nv04_blend_state {
8 uint32_t b_enable;
9 uint32_t b_src;
10 uint32_t b_dst;
11 };
12
13 struct nv04_fragtex_state {
14 uint32_t format;
15 };
16
17 struct nv04_sampler_state {
18 uint32_t filter;
19 uint32_t format;
20 };
21
22 struct nv04_depth_stencil_alpha_state {
23 uint32_t control;
24 };
25
26 struct nv04_rasterizer_state {
27 uint32_t blend;
28
29 const struct pipe_rasterizer_state *templ;
30 };
31
32 struct nv04_miptree {
33 struct pipe_texture base;
34 struct nouveau_bo *bo;
35
36 struct pipe_buffer *buffer;
37 uint total_size;
38
39 struct {
40 uint pitch;
41 uint *image_offset;
42 } level[PIPE_MAX_TEXTURE_LEVELS];
43 };
44
45 struct nv04_fragment_program_data {
46 unsigned offset;
47 unsigned index;
48 };
49
50 struct nv04_fragment_program {
51 struct pipe_shader_state pipe;
52 struct tgsi_shader_info info;
53
54 boolean translated;
55 boolean on_hw;
56 unsigned samplers;
57
58 uint32_t *insn;
59 int insn_len;
60
61 struct nv04_fragment_program_data *consts;
62 unsigned nr_consts;
63
64 struct pipe_buffer *buffer;
65
66 uint32_t fp_control;
67 uint32_t fp_reg_control;
68 };
69
70
71
72 #endif