2 * Mesa 3-D graphics library
4 * Copyright (C) 2012-2013 LunarG, Inc.
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
25 * Chia-I Wu <olv@lunarg.com>
28 #ifndef ILO_RENDER_GEN_H
29 #define ILO_RENDER_GEN_H
31 #include "ilo_common.h"
35 struct ilo_state_vector
;
37 struct gen6_draw_session
{
44 bool primitive_restart_changed
;
46 void (*emit_draw_commands
)(struct ilo_render
*render
,
47 const struct ilo_state_vector
*ilo
,
48 struct gen6_draw_session
*session
);
51 bool viewport_changed
;
58 bool sampler_vs_changed
;
59 bool sampler_gs_changed
;
60 bool sampler_fs_changed
;
67 bool binding_table_vs_changed
;
68 bool binding_table_gs_changed
;
69 bool binding_table_fs_changed
;
71 int num_surfaces
[PIPE_SHADER_TYPES
];
75 ilo_render_get_draw_dynamic_states_len(const struct ilo_render
*render
,
76 const struct ilo_state_vector
*vec
);
79 ilo_render_emit_draw_dynamic_states(struct ilo_render
*render
,
80 const struct ilo_state_vector
*vec
,
81 struct gen6_draw_session
*session
);
84 ilo_render_get_rectlist_dynamic_states_len(const struct ilo_render
*render
,
85 const struct ilo_blitter
*blitter
);
88 ilo_render_emit_rectlist_dynamic_states(struct ilo_render
*render
,
89 const struct ilo_blitter
*blitter
);
92 ilo_render_get_draw_surface_states_len(const struct ilo_render
*render
,
93 const struct ilo_state_vector
*vec
);
96 ilo_render_emit_draw_surface_states(struct ilo_render
*render
,
97 const struct ilo_state_vector
*vec
,
98 struct gen6_draw_session
*session
);
101 gen6_wa_pre_pipe_control(struct ilo_render
*r
, uint32_t dw1
);
104 gen6_draw_prepare(struct ilo_render
*r
,
105 const struct ilo_state_vector
*ilo
,
106 struct gen6_draw_session
*session
);
109 gen6_draw_emit(struct ilo_render
*r
,
110 const struct ilo_state_vector
*ilo
,
111 struct gen6_draw_session
*session
);
114 gen6_draw_end(struct ilo_render
*r
,
115 const struct ilo_state_vector
*ilo
,
116 struct gen6_draw_session
*session
);
119 gen6_draw_common_select(struct ilo_render
*r
,
120 const struct ilo_state_vector
*ilo
,
121 struct gen6_draw_session
*session
);
124 gen6_draw_common_sip(struct ilo_render
*r
,
125 const struct ilo_state_vector
*ilo
,
126 struct gen6_draw_session
*session
);
129 gen6_draw_common_base_address(struct ilo_render
*r
,
130 const struct ilo_state_vector
*ilo
,
131 struct gen6_draw_session
*session
);
134 gen6_draw_vf(struct ilo_render
*r
,
135 const struct ilo_state_vector
*ilo
,
136 struct gen6_draw_session
*session
);
139 gen6_draw_vf_statistics(struct ilo_render
*r
,
140 const struct ilo_state_vector
*ilo
,
141 struct gen6_draw_session
*session
);
144 gen6_draw_vs(struct ilo_render
*r
,
145 const struct ilo_state_vector
*ilo
,
146 struct gen6_draw_session
*session
);
149 gen6_draw_clip(struct ilo_render
*r
,
150 const struct ilo_state_vector
*ilo
,
151 struct gen6_draw_session
*session
);
154 gen6_draw_sf_rect(struct ilo_render
*r
,
155 const struct ilo_state_vector
*ilo
,
156 struct gen6_draw_session
*session
);
159 gen6_draw_wm_raster(struct ilo_render
*r
,
160 const struct ilo_state_vector
*ilo
,
161 struct gen6_draw_session
*session
);
164 ilo_render_init_gen6(struct ilo_render
*render
);
166 #endif /* ILO_RENDER_GEN_H */