Merge commit 'origin/gallium-master-merge'
[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
35 struct pipe_buffer *buffer;
36 uint total_size;
37
38 struct pipe_texture *shadow_tex;
39 struct pipe_surface *shadow_surface;
40
41 struct {
42 uint pitch;
43 uint image_offset;
44 } level[PIPE_MAX_TEXTURE_LEVELS];
45 };
46
47 struct nv04_fragment_program_data {
48 unsigned offset;
49 unsigned index;
50 };
51
52 struct nv04_fragment_program {
53 struct pipe_shader_state pipe;
54 struct tgsi_shader_info info;
55
56 boolean translated;
57 boolean on_hw;
58 unsigned samplers;
59
60 uint32_t *insn;
61 int insn_len;
62
63 struct nv04_fragment_program_data *consts;
64 unsigned nr_consts;
65
66 struct pipe_buffer *buffer;
67
68 uint32_t fp_control;
69 uint32_t fp_reg_control;
70 };
71
72
73
74 #endif