Mesa (master): gallium/draw: sketch out some missing pointcoord code

Brian Paul brianp at kemper.freedesktop.org
Mon Jun 29 21:28:19 UTC 2009


Module: Mesa
Branch: master
Commit: 423f45d18a665423e319dcea08c11ff9f5646a80
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=423f45d18a665423e319dcea08c11ff9f5646a80

Author: Brian Paul <brianp at vmware.com>
Date:   Mon Jun 29 15:24:42 2009 -0600

gallium/draw: sketch out some missing pointcoord code

The gl_PointCoord attribute is currently expected to be in the fog coord
register's z/w components.  This was never totally fleshed out though.
This is just some placeholder code.

---

 src/gallium/auxiliary/draw/draw_pipe_wide_point.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/src/gallium/auxiliary/draw/draw_pipe_wide_point.c b/src/gallium/auxiliary/draw/draw_pipe_wide_point.c
index d84bab9..014d8c7 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_wide_point.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_wide_point.c
@@ -181,6 +181,16 @@ static void widepoint_point( struct draw_stage *stage,
 }
 
 
+static int
+find_fog_input_attrib(struct draw_context *draw)
+{
+   /* Scan the fragment program's input decls to find the fogcoord
+    * attribute.  The z/w components will store the point coord.
+    */
+   return 0; /* XXX fix this */
+}
+
+
 static void widepoint_first_point( struct draw_stage *stage, 
 			      struct prim_header *header )
 {
@@ -220,7 +230,7 @@ static void widepoint_first_point( struct draw_stage *stage,
       wide->num_texcoords = j;
 
       /* find fragment shader PointCoord/Fog input */
-      wide->point_coord_fs_input = 0; /* XXX fix this! */
+      wide->point_coord_fs_input = find_fog_input_attrib(draw);
 
       /* setup extra vp output (point coord implemented as a texcoord) */
       draw->extra_vp_outputs.semantic_name = TGSI_SEMANTIC_GENERIC;




More information about the mesa-commit mailing list