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

« back to all changes in this revision

Viewing changes to src/gallium/auxiliary/draw/draw_pipe_wide_point.c

  • 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:
114
114
      /* put gl_PointCoord into the extra vertex slot */
115
115
      uint slot = wide->stage.draw->extra_shader_outputs.slot;
116
116
      v->data[slot][0] = tc[0];
117
 
      v->data[slot][1] = tc[1];
 
117
      if (wide->texcoord_mode == PIPE_SPRITE_COORD_LOWER_LEFT)
 
118
         v->data[slot][1] = 1.0f - tc[1];
 
119
      else
 
120
         v->data[slot][1] = tc[1];
118
121
      v->data[slot][2] = 0.0F;
119
122
      v->data[slot][3] = 1.0F;
120
123
   }
129
132
static void widepoint_point( struct draw_stage *stage,
130
133
                             struct prim_header *header )
131
134
{
132
 
   /* XXX should take point_quad_rasterization into account? */
133
135
   const struct widepoint_stage *wide = widepoint_stage(stage);
134
136
   const unsigned pos = draw_current_shader_position_output(stage->draw);
135
 
   const boolean sprite = (boolean) stage->draw->rasterizer->sprite_coord_enable;
 
137
   const boolean sprite = (boolean) stage->draw->rasterizer->point_quad_rasterization;
136
138
   float half_size;
137
139
   float left_adj, right_adj, bot_adj, top_adj;
138
140
 
218
220
   const struct pipe_rasterizer_state *rast = draw->rasterizer;
219
221
   void *r;
220
222
 
221
 
   wide->half_point_size = 0.5f * draw->rasterizer->point_size;
 
223
   wide->half_point_size = 0.5f * rast->point_size;
222
224
   wide->xbias = 0.0;
223
225
   wide->ybias = 0.0;
224
226
 
225
 
   if (draw->rasterizer->gl_rasterization_rules) {
 
227
   if (rast->gl_rasterization_rules) {
226
228
      wide->xbias = 0.125;
 
229
      wide->ybias = -0.125;
227
230
   }
228
231
 
229
232
   /* Disable triangle culling, stippling, unfilled mode etc. */
233
236
   draw->suspend_flushing = FALSE;
234
237
 
235
238
   /* XXX we won't know the real size if it's computed by the vertex shader! */
236
 
   if ((draw->rasterizer->point_size > draw->pipeline.wide_point_threshold) ||
237
 
       (draw->rasterizer->sprite_coord_enable && draw->pipeline.point_sprite)) {
 
239
   if ((rast->point_size > draw->pipeline.wide_point_threshold) ||
 
240
       (rast->point_quad_rasterization && draw->pipeline.point_sprite)) {
238
241
      stage->point = widepoint_point;
239
242
   }
240
243
   else {
241
244
      stage->point = draw_pipe_passthrough_point;
242
245
   }
243
246
 
244
 
   if (draw->rasterizer->sprite_coord_enable) {
 
247
   if (rast->point_quad_rasterization) {
245
248
      /* find vertex shader texcoord outputs */
246
249
      const struct draw_vertex_shader *vs = draw->vs.vertex_shader;
247
250
      uint i, j = 0;
248
 
      wide->texcoord_mode = draw->rasterizer->sprite_coord_mode;
 
251
      wide->texcoord_mode = rast->sprite_coord_mode;
249
252
      for (i = 0; i < vs->info.num_outputs; i++) {
250
253
         if (vs->info.output_semantic_name[i] == TGSI_SEMANTIC_GENERIC) {
251
254
            wide->texcoord_slot[j] = i;
252
 
            wide->texcoord_enable[j] = (draw->rasterizer->sprite_coord_enable >> j) & 1;
 
255
            wide->texcoord_enable[j] = (rast->sprite_coord_enable >> j) & 1;
253
256
            j++;
254
257
         }
255
258
      }
269
272
   }
270
273
 
271
274
   wide->psize_slot = -1;
272
 
   if (draw->rasterizer->point_size_per_vertex) {
 
275
   if (rast->point_size_per_vertex) {
273
276
      /* find PSIZ vertex output */
274
277
      const struct draw_vertex_shader *vs = draw->vs.vertex_shader;
275
278
      uint i;
322
325
   if (wide == NULL)
323
326
      goto fail;
324
327
 
325
 
   if (!draw_alloc_temp_verts( &wide->stage, 4 ))
326
 
      goto fail;
327
 
 
328
328
   wide->stage.draw = draw;
329
329
   wide->stage.name = "wide-point";
330
330
   wide->stage.next = NULL;
335
335
   wide->stage.reset_stipple_counter = widepoint_reset_stipple_counter;
336
336
   wide->stage.destroy = widepoint_destroy;
337
337
 
 
338
   if (!draw_alloc_temp_verts( &wide->stage, 4 ))
 
339
      goto fail;
 
340
 
338
341
   return &wide->stage;
339
342
 
340
343
 fail: