st/mesa: fix incorrect RowStride computation
[mesa.git] / src / gallium / drivers / nv30 / nv30_state.h
1 #ifndef __NV30_STATE_H__
2 #define __NV30_STATE_H__
3
4 #include "pipe/p_state.h"
5 #include "tgsi/tgsi_scan.h"
6
7 struct nv30_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 nv30_vertex_program_exec {
16 uint32_t data[4];
17 boolean has_branch_offset;
18 int const_index;
19 };
20
21 struct nv30_vertex_program_data {
22 int index; /* immediates == -1 */
23 float value[4];
24 };
25
26 struct nv30_vertex_program {
27 struct pipe_shader_state pipe;
28
29 boolean translated;
30
31 struct nv30_vertex_program_exec *insns;
32 unsigned nr_insns;
33 struct nv30_vertex_program_data *consts;
34 unsigned nr_consts;
35
36 struct nouveau_resource *exec;
37 unsigned exec_start;
38 struct nouveau_resource *data;
39 unsigned data_start;
40 unsigned data_start_min;
41
42 uint32_t ir;
43 uint32_t or;
44 struct nouveau_stateobj *so;
45 };
46
47 struct nv30_fragment_program_data {
48 unsigned offset;
49 unsigned index;
50 };
51
52 struct nv30_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 nv30_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 struct nouveau_stateobj *so;
71 };
72
73 struct nv30_miptree {
74 struct pipe_texture base;
75 struct nouveau_bo *bo;
76
77 struct pipe_buffer *buffer;
78 uint total_size;
79
80 struct {
81 uint pitch;
82 uint *image_offset;
83 } level[PIPE_MAX_TEXTURE_LEVELS];
84 };
85
86 #endif