nv30_state.h revision 1771d8f8f4256773de1883a033081f9cc4cddf00
1#ifndef __NV30_STATE_H__ 2#define __NV30_STATE_H__ 3 4#include "pipe/p_state.h" 5#include "tgsi/tgsi_scan.h" 6 7struct 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 15struct nv30_vertex_program_exec { 16 uint32_t data[4]; 17 boolean has_branch_offset; 18 int const_index; 19}; 20 21struct nv30_vertex_program_data { 22 int index; /* immediates == -1 */ 23 float value[4]; 24}; 25 26struct 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 47struct nv30_fragment_program_data { 48 unsigned offset; 49 unsigned index; 50}; 51 52struct nv30_fragment_program { 53 struct pipe_shader_state pipe; 54 struct tgsi_shader_info info; 55 56 boolean translated; 57 unsigned samplers; 58 59 uint32_t *insn; 60 int insn_len; 61 62 struct nv30_fragment_program_data *consts; 63 unsigned nr_consts; 64 65 struct pipe_buffer *buffer; 66 67 uint32_t fp_control; 68 struct nouveau_stateobj *so; 69}; 70 71#define NV30_MAX_TEXTURE_LEVELS 16 72 73struct 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[NV30_MAX_TEXTURE_LEVELS]; 84}; 85 86#endif 87