Merge remote branch 'main/master' into radeon-rewrite
[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 {
39 uint pitch;
40 uint image_offset;
41 } level[PIPE_MAX_TEXTURE_LEVELS];
42 };
43
44 struct nv04_fragment_program_data {
45 unsigned offset;
46 unsigned index;
47 };
48
49 struct nv04_fragment_program {
50 struct pipe_shader_state pipe;
51 struct tgsi_shader_info info;
52
53 boolean translated;
54 boolean on_hw;
55 unsigned samplers;
56
57 uint32_t *insn;
58 int insn_len;
59
60 struct nv04_fragment_program_data *consts;
61 unsigned nr_consts;
62
63 struct pipe_buffer *buffer;
64
65 uint32_t fp_control;
66 uint32_t fp_reg_control;
67 };
68
69
70
71 #endif