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

« back to all changes in this revision

Viewing changes to src/gallium/drivers/llvmpipe/lp_rast.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:
66
66
   struct lp_jit_context jit_context;
67
67
   
68
68
   /* The shader itself.  Probably we also need to pass a pointer to
69
 
    * the tile color/z/stencil data somehow:
70
 
    * jit_function[0] skips the triangle in/out test code
71
 
    * jit_function[1] does triangle in/out testing
 
69
    * the tile color/z/stencil data somehow
72
70
     */
73
 
   lp_jit_frag_func jit_function[2];
74
 
 
75
 
   boolean opaque;
 
71
   struct lp_fragment_shader_variant *variant;
76
72
};
77
73
 
78
74
 
82
78
 * These pointers point into the bin data buffer.
83
79
 */
84
80
struct lp_rast_shader_inputs {
 
81
   float facing;     /** Positive for front-facing, negative for back-facing */
 
82
   boolean disable:1;  /** Partially binned, disable this command */
 
83
   boolean opaque:1;   /** Is opaque */
 
84
 
85
85
   float (*a0)[4];
86
86
   float (*dadx)[4];
87
87
   float (*dady)[4];
88
88
 
89
 
   /* edge/step info for 3 edges and 4x4 block of pixels */
90
 
   PIPE_ALIGN_VAR(16) int step[3][16];
91
 
};
92
 
 
 
89
   const struct lp_rast_state *state;
 
90
};
 
91
 
 
92
 
 
93
struct lp_rast_plane {
 
94
   /* one-pixel sized trivial accept offsets for each plane */
 
95
   int ei;
 
96
 
 
97
   /* one-pixel sized trivial reject offsets for each plane */
 
98
   int eo;
 
99
 
 
100
   /* edge function values at minx,miny ?? */
 
101
   int c;
 
102
 
 
103
   int dcdx;
 
104
   int dcdy;
 
105
};
93
106
 
94
107
/**
95
108
 * Rasterization information for a triangle known to be in this bin,
96
109
 * plus inputs to run the shader:
97
110
 * These fields are tile- and bin-independent.
98
 
 * Objects of this type are put into the setup_context::data buffer.
 
111
 * Objects of this type are put into the lp_setup_context::data buffer.
99
112
 */
100
113
struct lp_rast_triangle {
 
114
   /* inputs for the shader */
 
115
   struct lp_rast_shader_inputs inputs;
 
116
 
101
117
#ifdef DEBUG
102
118
   float v[3][2];
103
119
#endif
104
120
 
105
 
   /* one-pixel sized trivial accept offsets for each plane */
106
 
   int ei1;                   
107
 
   int ei2;
108
 
   int ei3;
109
 
 
110
 
   /* one-pixel sized trivial reject offsets for each plane */
111
 
   int eo1;                   
112
 
   int eo2;
113
 
   int eo3;
114
 
 
115
 
   /* y deltas for vertex pairs (in fixed pt) */
116
 
   int dy12;
117
 
   int dy23;
118
 
   int dy31;
119
 
 
120
 
   /* x deltas for vertex pairs (in fixed pt) */
121
 
   int dx12;
122
 
   int dx23;
123
 
   int dx31;
124
 
 
125
 
   /* edge function values at minx,miny ?? */
126
 
   int c1, c2, c3;
127
 
 
128
 
   /* inputs for the shader */
129
 
   PIPE_ALIGN_VAR(16) struct lp_rast_shader_inputs inputs;
 
121
   struct lp_rast_plane plane[8]; /* NOTE: may allocate fewer planes */
130
122
};
131
123
 
132
124
 
133
125
 
134
126
struct lp_rasterizer *
135
 
lp_rast_create( void );
 
127
lp_rast_create( unsigned num_threads );
136
128
 
137
129
void
138
130
lp_rast_destroy( struct lp_rasterizer * );
150
142
 
151
143
union lp_rast_cmd_arg {
152
144
   const struct lp_rast_shader_inputs *shade_tile;
153
 
   const struct lp_rast_triangle *triangle;
 
145
   struct {
 
146
      const struct lp_rast_triangle *tri;
 
147
      unsigned plane_mask;
 
148
   } triangle;
154
149
   const struct lp_rast_state *set_state;
155
150
   uint8_t clear_color[4];
156
 
   unsigned clear_zstencil;
 
151
   struct {
 
152
      unsigned value;
 
153
      unsigned mask;
 
154
   } clear_zstencil;
157
155
   struct lp_fence *fence;
 
156
   struct llvmpipe_query *query_obj;
158
157
};
159
158
 
160
159
 
169
168
}
170
169
 
171
170
static INLINE union lp_rast_cmd_arg
172
 
lp_rast_arg_triangle( const struct lp_rast_triangle *triangle )
 
171
lp_rast_arg_triangle( const struct lp_rast_triangle *triangle,
 
172
                      unsigned plane_mask)
173
173
{
174
174
   union lp_rast_cmd_arg arg;
175
 
   arg.triangle = triangle;
 
175
   arg.triangle.tri = triangle;
 
176
   arg.triangle.plane_mask = plane_mask;
176
177
   return arg;
177
178
}
178
179
 
194
195
 
195
196
 
196
197
static INLINE union lp_rast_cmd_arg
 
198
lp_rast_arg_clearzs( unsigned value, unsigned mask )
 
199
{
 
200
   union lp_rast_cmd_arg arg;
 
201
   arg.clear_zstencil.value = value;
 
202
   arg.clear_zstencil.mask = mask;
 
203
   return arg;
 
204
}
 
205
 
 
206
 
 
207
static INLINE union lp_rast_cmd_arg
 
208
lp_rast_arg_query( struct llvmpipe_query *pq )
 
209
{
 
210
   union lp_rast_cmd_arg arg;
 
211
   arg.query_obj = pq;
 
212
   return arg;
 
213
}
 
214
 
 
215
static INLINE union lp_rast_cmd_arg
197
216
lp_rast_arg_null( void )
198
217
{
199
218
   union lp_rast_cmd_arg arg;
202
221
}
203
222
 
204
223
 
205
 
 
206
224
/**
207
225
 * Binnable Commands.
208
226
 * These get put into bins by the setup code and are called when
209
227
 * the bins are executed.
210
228
 */
211
 
 
212
 
void lp_rast_clear_color( struct lp_rasterizer_task *, 
213
 
                          const union lp_rast_cmd_arg );
214
 
 
215
 
void lp_rast_clear_zstencil( struct lp_rasterizer_task *, 
216
 
                             const union lp_rast_cmd_arg );
217
 
 
218
 
void lp_rast_load_color( struct lp_rasterizer_task *, 
219
 
                         const union lp_rast_cmd_arg );
220
 
 
221
 
void lp_rast_set_state( struct lp_rasterizer_task *, 
222
 
                        const union lp_rast_cmd_arg );
223
 
 
224
 
void lp_rast_triangle( struct lp_rasterizer_task *, 
225
 
                       const union lp_rast_cmd_arg );
226
 
 
227
 
void lp_rast_shade_tile( struct lp_rasterizer_task *,
228
 
                         const union lp_rast_cmd_arg );
229
 
 
230
 
void lp_rast_fence( struct lp_rasterizer_task *,
231
 
                    const union lp_rast_cmd_arg );
 
229
#define LP_RAST_OP_CLEAR_COLOR       0x0
 
230
#define LP_RAST_OP_CLEAR_ZSTENCIL    0x1
 
231
#define LP_RAST_OP_TRIANGLE_1        0x2
 
232
#define LP_RAST_OP_TRIANGLE_2        0x3
 
233
#define LP_RAST_OP_TRIANGLE_3        0x4
 
234
#define LP_RAST_OP_TRIANGLE_4        0x5
 
235
#define LP_RAST_OP_TRIANGLE_5        0x6
 
236
#define LP_RAST_OP_TRIANGLE_6        0x7
 
237
#define LP_RAST_OP_TRIANGLE_7        0x8
 
238
#define LP_RAST_OP_TRIANGLE_8        0x9
 
239
#define LP_RAST_OP_TRIANGLE_3_16     0xa
 
240
#define LP_RAST_OP_SHADE_TILE        0xb
 
241
#define LP_RAST_OP_SHADE_TILE_OPAQUE 0xc
 
242
#define LP_RAST_OP_BEGIN_QUERY       0xd
 
243
#define LP_RAST_OP_END_QUERY         0xe
 
244
 
 
245
#define LP_RAST_OP_MAX               0xf
 
246
#define LP_RAST_OP_MASK              0xff
 
247
 
 
248
void
 
249
lp_debug_bins( struct lp_scene *scene );
 
250
void
 
251
lp_debug_draw_bins_by_cmd_length( struct lp_scene *scene );
 
252
void
 
253
lp_debug_draw_bins_by_coverage( struct lp_scene *scene );
232
254
 
233
255
#endif