~ubuntu-branches/ubuntu/natty/mesa/natty-proposed

« back to all changes in this revision

Viewing changes to src/gallium/auxiliary/draw/draw_pt.h

  • Committer: Bazaar Package Importer
  • Author(s): Robert Hooker, Robert Hooker, Christopher James Halse Rogers
  • Date: 2010-09-14 08:55:40 UTC
  • mfrom: (1.2.28 upstream)
  • Revision ID: james.westby@ubuntu.com-20100914085540-m4fpl0hdjlfd4jgz
Tags: 7.9~git20100909-0ubuntu1
[ Robert Hooker ]
* New upstream git snapshot up to commit 94118fe2d4b1e5 (LP: #631413)
* New features include ATI HD5xxx series support in r600, and a vastly
  improved glsl compiler.
* Remove pre-generated .pc's, use the ones generated at build time
  instead.
* Remove all references to mesa-utils now that its no longer shipped
  with the mesa source.
* Disable the experimental ARB_fragment_shader option by default on
  i915, it exposes incomplete functionality that breaks KDE compositing
  among other things. It can be enabled via driconf still. (LP: #628930).

[ Christopher James Halse Rogers ]
* debian/patches/04_osmesa_version.diff:
  - Refresh for new upstream
* Bugs fixed in this release:
  - Fixes severe rendering corruption in Unity on radeon (LP: #628727,
    LP: #596292, LP: #599741, LP: #630315, LP: #613694, LP: #599741).
  - Also fixes rendering in gnome-shell (LP: #578619).
  - Flickering in OpenGL apps on radeon (LP: #626943, LP: #610541).
  - Provides preliminary support for new intel chips (LP: #601052).
* debian/rules:
  - Update configure flags to match upstream reshuffling.
  - Explicitly remove gallium DRI drivers that we don't want to ship.
* Update debian/gbp.conf for this Maverick-specific packaging
* libegl1-mesa-dri-x11,kms: There are no longer separate kms or x11 drivers
  for EGL, libegl1-mesa-drivers now contains a single driver that provides
  both backends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
#include "pipe/p_compiler.h"
37
37
 
38
 
typedef unsigned (*pt_elt_func)( const void *elts, unsigned idx );
39
 
 
40
38
struct draw_pt_middle_end;
41
39
struct draw_context;
 
40
struct draw_prim_info;
 
41
struct draw_vertex_info;
42
42
 
43
43
 
44
44
#define PT_SHADE      0x1
50
50
/* The "front end" - prepare sets of fetch, draw elements for the
51
51
 * middle end.
52
52
 *
53
 
 * Currenly one version of this:
54
 
 *    - vcache - catchall implementation, decomposes to TRI/LINE/POINT prims
55
 
 * Later:
56
 
 *    - varray, varray_split
57
 
 *    - velement, velement_split
58
 
 *
59
 
 * Currenly only using the vcache version.
 
53
 * The fetch elements are indices to the vertices.  The draw elements are
 
54
 * indices to the fetched vertices.  When both arrays of elements are both
 
55
 * linear, middle->run_linear is called;  When only the fetch elements are
 
56
 * linear, middle->run_linear_elts is called;  Otherwise, middle->run is
 
57
 * called.
 
58
 *
 
59
 * When the number of the draw elements exceeds max_vertex of the middle end,
 
60
 * the draw elements (as well as the fetch elements) are splitted and the
 
61
 * middle end is called multiple times.
 
62
 *
 
63
 * Currenly there is:
 
64
 *    - vsplit - catchall implementation, splits big prims
60
65
 */
61
66
struct draw_pt_front_end {
62
67
   void (*prepare)( struct draw_pt_front_end *,
65
70
                    unsigned opt );
66
71
 
67
72
   void (*run)( struct draw_pt_front_end *,
68
 
                pt_elt_func elt_func,
69
 
                const void *elt_ptr,
 
73
                unsigned start,
70
74
                unsigned count );
71
75
 
72
76
   void (*finish)( struct draw_pt_front_end * );
77
81
/* The "middle end" - prepares actual hardware vertices for the
78
82
 * hardware backend.
79
83
 *
 
84
 * prim_flags is as defined by pipe_draw_info::flags.
 
85
 *
80
86
 * Currently two versions of this:
81
87
 *     - fetch, vertex shade, cliptest, prim-pipeline
82
88
 *     - fetch, emit (ie passthrough)
91
97
                const unsigned *fetch_elts,
92
98
                unsigned fetch_count,
93
99
                const ushort *draw_elts,
94
 
                unsigned draw_count );
 
100
                unsigned draw_count,
 
101
                unsigned prim_flags );
95
102
 
96
103
   void (*run_linear)(struct draw_pt_middle_end *,
97
104
                      unsigned start,
98
 
                      unsigned count);
 
105
                      unsigned count,
 
106
                      unsigned prim_flags );
99
107
 
100
108
   /* Transform all vertices in a linear range and then draw them with
101
109
    * the supplied element list.  May fail and return FALSE.
104
112
                            unsigned fetch_start,
105
113
                            unsigned fetch_count,
106
114
                            const ushort *draw_elts,
107
 
                            unsigned draw_count );
 
115
                            unsigned draw_count,
 
116
                            unsigned prim_flags );
108
117
 
109
118
   int (*get_max_vertex_count)( struct draw_pt_middle_end * );
110
119
 
119
128
struct vertex_header;
120
129
 
121
130
 
122
 
/* Helper functions.
123
 
 */
124
 
pt_elt_func draw_pt_elt_func( struct draw_context *draw );
125
 
const void *draw_pt_elt_ptr( struct draw_context *draw,
126
 
                             unsigned start );
127
 
 
128
131
/* Frontends: 
129
132
 *
130
 
 * Currently only the general-purpose vcache implementation, could add
131
 
 * a special case for tiny vertex buffers.
 
133
 * Currently only the general-purpose vsplit implementation.
132
134
 */
133
 
struct draw_pt_front_end *draw_pt_vcache( struct draw_context *draw );
134
 
struct draw_pt_front_end *draw_pt_varray(struct draw_context *draw);
 
135
struct draw_pt_front_end *draw_pt_vsplit(struct draw_context *draw);
135
136
 
136
137
 
137
138
/* Middle-ends:
147
148
struct draw_pt_middle_end *draw_pt_fetch_emit( struct draw_context *draw );
148
149
struct draw_pt_middle_end *draw_pt_middle_fse( struct draw_context *draw );
149
150
struct draw_pt_middle_end *draw_pt_fetch_pipeline_or_emit(struct draw_context *draw);
 
151
struct draw_pt_middle_end *draw_pt_fetch_pipeline_or_emit_llvm(struct draw_context *draw);
150
152
 
151
153
 
152
154
 
160
162
                           unsigned *max_vertices );
161
163
 
162
164
void draw_pt_emit( struct pt_emit *emit,
163
 
                   const float (*vertex_data)[4],
164
 
                   unsigned vertex_count,
165
 
                   unsigned stride,
166
 
                   const ushort *elts,
167
 
                   unsigned count );
 
165
                   const struct draw_vertex_info *vert_info,
 
166
                   const struct draw_prim_info *prim_info);
168
167
 
169
168
void draw_pt_emit_linear( struct pt_emit *emit,
170
 
                          const float (*vertex_data)[4],
171
 
                          unsigned stride,
172
 
                          unsigned count );
 
169
                          const struct draw_vertex_info *vert_info,
 
170
                          const struct draw_prim_info *prim_info);
173
171
 
174
172
void draw_pt_emit_destroy( struct pt_emit *emit );
175
173
 
176
174
struct pt_emit *draw_pt_emit_create( struct draw_context *draw );
177
175
 
 
176
/*******************************************************************************
 
177
 * HW stream output emit:
 
178
 */
 
179
struct pt_so_emit;
 
180
 
 
181
void draw_pt_so_emit_prepare( struct pt_so_emit *emit );
 
182
 
 
183
void draw_pt_so_emit( struct pt_so_emit *emit,
 
184
                      const struct draw_vertex_info *vert_info,
 
185
                      const struct draw_prim_info *prim_info );
 
186
 
 
187
void draw_pt_so_emit_destroy( struct pt_so_emit *emit );
 
188
 
 
189
struct pt_so_emit *draw_pt_so_emit_create( struct draw_context *draw );
178
190
 
179
191
/*******************************************************************************
180
192
 * API vertex fetch:
206
218
struct pt_post_vs;
207
219
 
208
220
boolean draw_pt_post_vs_run( struct pt_post_vs *pvs,
209
 
                             struct vertex_header *pipeline_verts,
210
 
                             unsigned stride,
211
 
                             unsigned count );
 
221
                             struct draw_vertex_info *info );
212
222
 
213
223
void draw_pt_post_vs_prepare( struct pt_post_vs *pvs,
214
 
                              boolean bypass_clipping,
 
224
                              boolean clip_xy,
 
225
                              boolean clip_z,
 
226
                              boolean clip_user,
215
227
                              boolean bypass_viewport,
216
228
                              boolean opengl,
217
229
                              boolean need_edgeflags );
225
237
 * Utils: 
226
238
 */
227
239
void draw_pt_split_prim(unsigned prim, unsigned *first, unsigned *incr);
 
240
unsigned draw_pt_trim_count(unsigned count, unsigned first, unsigned incr);
228
241
 
229
242
 
230
243
#endif