revert between 56095 -> 55830 in arch
[AROS.git] / workbench / libs / mesa / src / gallium / drivers / nvfx / nvfx_state.h
blob8fafca1950ccb5bc4116373dd881ef18899b7a87
1 #ifndef __NVFX_STATE_H__
2 #define __NVFX_STATE_H__
4 #include "pipe/p_state.h"
5 #include "tgsi/tgsi_scan.h"
6 #include "nouveau/nouveau_statebuf.h"
7 #include "util/u_dynarray.h"
8 #include "util/u_linkage.h"
10 struct nvfx_vertex_program_exec {
11 uint32_t data[4];
14 struct nvfx_vertex_program_data {
15 int index; /* immediates == -1 */
16 float value[4];
19 struct nvfx_vertex_program {
20 unsigned long long id;
22 struct nvfx_vertex_program_exec *insns;
23 unsigned nr_insns;
24 struct nvfx_vertex_program_data *consts;
25 unsigned nr_consts;
27 char generic_to_fp_input[256];
28 int sprite_fp_input;
30 struct nouveau_resource *exec;
31 unsigned exec_start;
32 struct nouveau_resource *data;
33 unsigned data_start;
34 unsigned data_start_min;
36 uint32_t ir;
37 uint32_t or;
38 int clip_nr;
40 struct util_dynarray branch_relocs;
41 struct util_dynarray const_relocs;
44 #define NVFX_VP_FAILED ((struct nvfx_vertex_program*)-1)
46 struct nvfx_pipe_vertex_program {
47 struct pipe_shader_state pipe;
48 struct tgsi_shader_info info;
50 unsigned draw_elements;
51 boolean draw_no_elements;
52 struct draw_vertex_shader *draw_vs;
53 struct nvfx_vertex_program* draw_vp;
55 struct nvfx_vertex_program* vp;
58 struct nvfx_fragment_program_data {
59 unsigned offset;
60 unsigned index;
63 struct nvfx_fragment_program_bo {
64 struct nvfx_fragment_program_bo* next;
65 struct nouveau_bo* bo;
66 unsigned char* slots;
67 char insn[] __attribute__((aligned(16)));
70 struct nvfx_fragment_program {
71 unsigned samplers;
72 unsigned point_sprite_control;
73 unsigned or;
74 unsigned coord_conventions;
76 uint32_t *insn;
77 int insn_len;
79 struct nvfx_fragment_program_data *consts;
80 unsigned nr_consts;
82 /* the slot at num_slots is for the sprite coordinate, if any */
83 unsigned num_slots; /* how many input semantics? */
84 unsigned char slot_to_generic[10]; /* semantics */
85 unsigned char slot_to_fp_input[11]; /* current assignment of slots for each used semantic */
86 struct util_dynarray slot_relocations[11];
88 /* This is reset to progs on any relocation update, and decreases every time we
89 * move to a new prog due to a constant update
90 * When this is the same as progs, applying relocations is no longer necessary.
92 unsigned progs_left_with_obsolete_slot_assignments;
94 unsigned long long last_vp_id;
95 unsigned last_sprite_coord_enable;
97 uint32_t fp_control;
99 unsigned bo_prog_idx;
100 unsigned prog_size;
101 unsigned progs_per_bo;
102 unsigned progs;
104 struct nvfx_fragment_program_bo* fpbo;
107 struct nvfx_pipe_fragment_program {
108 struct pipe_shader_state pipe;
109 struct tgsi_shader_info info;
111 struct nvfx_fragment_program* fps[2];
114 #endif