Merge branch 'gallium-nopointsizeminmax'
authorRoland Scheidegger <sroland@vmware.com>
Tue, 9 Feb 2010 18:32:21 +0000 (19:32 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Tue, 9 Feb 2010 18:32:21 +0000 (19:32 +0100)
Conflicts:
src/gallium/drivers/nv10/nv10_state.c
src/gallium/drivers/nv20/nv20_state.c
src/gallium/drivers/nv50/nv50_program.c

21 files changed:
1  2 
src/gallium/auxiliary/draw/draw_pipe_validate.c
src/gallium/docs/source/cso/rasterizer.rst
src/gallium/docs/source/tgsi.rst
src/gallium/drivers/i965/brw_sf.c
src/gallium/drivers/nv30/nv30_state.c
src/gallium/drivers/nv40/nv40_state.c
src/gallium/drivers/nv50/nv50_program.c
src/gallium/drivers/nv50/nv50_state.c
src/gallium/drivers/r300/r300_state.c
src/gallium/drivers/softpipe/sp_video_context.c
src/gallium/drivers/svga/svga_context.h
src/gallium/drivers/svga/svga_pipe_rasterizer.c
src/gallium/drivers/svga/svga_screen.c
src/gallium/drivers/svga/svga_state_rss.c
src/gallium/drivers/trace/tr_dump_state.c
src/gallium/include/pipe/p_defines.h
src/gallium/include/pipe/p_state.h
src/gallium/state_trackers/python/retrace/interpreter.py
src/mesa/shader/prog_statevars.c
src/mesa/state_tracker/st_extensions.c
src/mesa/state_tracker/st_mesa_to_tgsi.c

@@@ -194,10 -194,10 +194,10 @@@ static struct draw_stage *validate_pipe
     if (wide_lines) {
        draw->pipeline.wide_line->next = next;
        next = draw->pipeline.wide_line;
 -      precalc_flat = 1;
 +      precalc_flat = TRUE;
     }
  
-    if (wide_points || draw->rasterizer->point_sprite) {
+    if (wide_points || draw->rasterizer->sprite_coord_enable) {
        draw->pipeline.wide_point->next = next;
        next = draw->pipeline.wide_point;
     }
@@@ -119,21 -82,23 +119,23 @@@ point_size_per_verte
      Whether vertices have a point size element.
  point_size
      The size of points, if not specified per-vertex.
- point_size_min
-     The minimum size of points.
- point_size_max
-     The maximum size of points.
- point_sprite
-     Whether points are drawn as sprites (textured quads)
+ sprite_coord_enable
+     Specifies if a coord has its texture coordinates replaced or not. This
+     is a packed bitfield containing the enable for all coords - if all are 0
+     point sprites are effectively disabled, though points may still be
+     rendered slightly different according to point_quad_rasterization.
+     If any coord is non-zero, point_smooth should be disabled, and
+     point_quad_rasterization enabled.
+     If enabled, the four vertices of the resulting quad will be assigned
+     texture coordinates, according to sprite_coord_mode.
  sprite_coord_mode
      Specifies how the value for each shader output should be computed when
-     drawing sprites.  If PIPE_SPRITE_COORD_NONE, don't change the vertex
-     shader output.  Otherwise, the four vertices of the resulting quad will
-     be assigned texture coordinates.  For PIPE_SPRITE_COORD_LOWER_LEFT, the
-     lower left vertex will have coordinate (0,0,0,1).
+     drawing sprites, for each coord which has sprite_coord_enable set.
+     For PIPE_SPRITE_COORD_LOWER_LEFT, the lower left vertex will have
+     coordinate (0,0,0,1).
      For PIPE_SPRITE_COORD_UPPER_LEFT, the upper-left vertex will have
      coordinate (0,0,0,1).
 -    This state is needed by the 'draw' module because that's where each
 +    This state is needed by :ref:`Draw` because that's where each
      point vertex is converted into four quad vertices.  There's no other
      place to emit the new vertex texture coordinates which are required for
      sprite rendering.
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -4401,21 -4057,23 +4401,19 @@@ nv50_pntc_replace(struct nv50_context *
                        continue;
                }
  
 -              for (j = 0; j < vp->info.num_outputs; ++j) {
 -                      sn = vp->info.output_semantic_name[j];
 -                      si = vp->info.output_semantic_index[j];
 -
 -                      if (sn == fp->info.input_semantic_name[k] &&
 -                          si == fp->info.input_semantic_index[k])
 +              for (j = 0; j < vp->cfg.out_nr; ++j)
 +                      if (vp->cfg.out[j].sn ==  fp->cfg.in[i].sn &&
 +                          vp->cfg.out[j].si == fp->cfg.in[i].si)
                                break;
 -              }
  
-               if (j < vp->cfg.out_nr) {
-                       ubyte mode = nv50->rasterizer->pipe.sprite_coord_mode[
-                               vp->cfg.out[j].si];
+               if (j < vp->info.num_outputs) {
+                       ubyte enable =
 -                               (nv50->rasterizer->pipe.sprite_coord_enable >> si) & 1;
++                               (nv50->rasterizer->pipe.sprite_coord_enable >> vp->cfg.out[j].si) & 1;
  
-                       if (mode == PIPE_SPRITE_COORD_NONE) {
+                       if (enable == 0) {
                                m += n;
                                continue;
-                       } else
-                       if (mode == PIPE_SPRITE_COORD_LOWER_LEFT)
-                               origin = 0;
+                       }
                }
  
                /* this is either PointCoord or replaced by sprite coords */
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge