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_3D_PIPELINE_GEN6_H
29 #define ILO_3D_PIPELINE_GEN6_H
31 #include "ilo_common.h"
33 struct ilo_3d_pipeline
;
36 struct gen6_pipeline_session
{
37 const struct pipe_draw_info
*info
;
45 bool state_bo_changed
;
46 bool instruction_bo_changed
;
49 void (*emit_draw_states
)(struct ilo_3d_pipeline
*p
,
50 const struct ilo_context
*ilo
,
51 struct gen6_pipeline_session
*session
);
53 void (*emit_draw_commands
)(struct ilo_3d_pipeline
*p
,
54 const struct ilo_context
*ilo
,
55 struct gen6_pipeline_session
*session
);
58 bool viewport_state_changed
;
59 bool cc_state_blend_changed
;
60 bool cc_state_dsa_changed
;
61 bool cc_state_cc_changed
;
62 bool scissor_state_changed
;
63 bool binding_table_vs_changed
;
64 bool binding_table_gs_changed
;
65 bool binding_table_fs_changed
;
66 bool sampler_state_vs_changed
;
67 bool sampler_state_gs_changed
;
68 bool sampler_state_fs_changed
;
69 bool pcb_state_vs_changed
;
70 bool pcb_state_gs_changed
;
71 bool pcb_state_fs_changed
;
73 int num_surfaces
[PIPE_SHADER_TYPES
];
77 gen6_pipeline_prepare(const struct ilo_3d_pipeline
*p
,
78 const struct ilo_context
*ilo
,
79 const struct pipe_draw_info
*info
,
80 struct gen6_pipeline_session
*session
);
83 gen6_pipeline_draw(struct ilo_3d_pipeline
*p
,
84 const struct ilo_context
*ilo
,
85 struct gen6_pipeline_session
*session
);
88 gen6_pipeline_end(struct ilo_3d_pipeline
*p
,
89 const struct ilo_context
*ilo
,
90 struct gen6_pipeline_session
*session
);
93 gen6_pipeline_common_select(struct ilo_3d_pipeline
*p
,
94 const struct ilo_context
*ilo
,
95 struct gen6_pipeline_session
*session
);
98 gen6_pipeline_common_sip(struct ilo_3d_pipeline
*p
,
99 const struct ilo_context
*ilo
,
100 struct gen6_pipeline_session
*session
);
103 gen6_pipeline_common_base_address(struct ilo_3d_pipeline
*p
,
104 const struct ilo_context
*ilo
,
105 struct gen6_pipeline_session
*session
);
108 gen6_pipeline_vf(struct ilo_3d_pipeline
*p
,
109 const struct ilo_context
*ilo
,
110 struct gen6_pipeline_session
*session
);
113 gen6_pipeline_vf_statistics(struct ilo_3d_pipeline
*p
,
114 const struct ilo_context
*ilo
,
115 struct gen6_pipeline_session
*session
);
118 gen6_pipeline_vf_draw(struct ilo_3d_pipeline
*p
,
119 const struct ilo_context
*ilo
,
120 struct gen6_pipeline_session
*session
);
123 gen6_pipeline_vs(struct ilo_3d_pipeline
*p
,
124 const struct ilo_context
*ilo
,
125 struct gen6_pipeline_session
*session
);
128 gen6_pipeline_clip(struct ilo_3d_pipeline
*p
,
129 const struct ilo_context
*ilo
,
130 struct gen6_pipeline_session
*session
);
133 gen6_pipeline_sf_rect(struct ilo_3d_pipeline
*p
,
134 const struct ilo_context
*ilo
,
135 struct gen6_pipeline_session
*session
);
138 gen6_pipeline_wm_raster(struct ilo_3d_pipeline
*p
,
139 const struct ilo_context
*ilo
,
140 struct gen6_pipeline_session
*session
);
143 gen6_pipeline_states(struct ilo_3d_pipeline
*p
,
144 const struct ilo_context
*ilo
,
145 struct gen6_pipeline_session
*session
);
148 ilo_3d_pipeline_emit_flush_gen6(struct ilo_3d_pipeline
*p
);
151 ilo_3d_pipeline_emit_write_timestamp_gen6(struct ilo_3d_pipeline
*p
,
152 struct intel_bo
*bo
, int index
);
155 ilo_3d_pipeline_emit_write_depth_count_gen6(struct ilo_3d_pipeline
*p
,
156 struct intel_bo
*bo
, int index
);
159 ilo_3d_pipeline_init_gen6(struct ilo_3d_pipeline
*p
);
161 #endif /* ILO_3D_PIPELINE_GEN6_H */