gallium: add target-helpers/wrap_screen.c to C_SOURCES
[mesa/mesa-lb.git] / src / gallium / drivers / nvfx / nvfx_state.h
blobe585246879b8a53a081ffb335c9bb94ac9e1ead0
1 #ifndef __NVFX_STATE_H__
2 #define __NVFX_STATE_H__
4 #include "pipe/p_state.h"
5 #include "tgsi/tgsi_scan.h"
7 struct nvfx_vertex_program_exec {
8 uint32_t data[4];
9 boolean has_branch_offset;
10 int const_index;
13 struct nvfx_vertex_program_data {
14 int index; /* immediates == -1 */
15 float value[4];
18 struct nvfx_vertex_program {
19 struct pipe_shader_state pipe;
21 struct draw_vertex_shader *draw;
23 boolean translated;
25 struct pipe_clip_state ucp;
27 struct nvfx_vertex_program_exec *insns;
28 unsigned nr_insns;
29 struct nvfx_vertex_program_data *consts;
30 unsigned nr_consts;
32 struct nouveau_resource *exec;
33 unsigned exec_start;
34 struct nouveau_resource *data;
35 unsigned data_start;
36 unsigned data_start_min;
38 uint32_t ir;
39 uint32_t or;
40 uint32_t clip_ctrl;
41 struct nouveau_stateobj *so;
44 struct nvfx_fragment_program_data {
45 unsigned offset;
46 unsigned index;
49 struct nvfx_fragment_program {
50 struct pipe_shader_state pipe;
51 struct tgsi_shader_info info;
53 boolean translated;
54 unsigned samplers;
56 uint32_t *insn;
57 int insn_len;
59 struct nvfx_fragment_program_data *consts;
60 unsigned nr_consts;
62 struct pipe_buffer *buffer;
64 uint32_t fp_control;
65 struct nouveau_stateobj *so;
68 #define NVFX_MAX_TEXTURE_LEVELS 16
70 struct nvfx_miptree {
71 struct pipe_texture base;
72 struct nouveau_bo *bo;
74 struct pipe_buffer *buffer;
75 uint total_size;
77 struct {
78 uint pitch;
79 uint *image_offset;
80 } level[NVFX_MAX_TEXTURE_LEVELS];
83 #endif