summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/softpipe
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-07-12 13:32:31 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-07-12 13:32:31 -0600
commitea470eec86715cd2bc9aa86d36e6ea803d0d4017 (patch)
treea947814c588475299fc4b7f5fc41681d652838d1 /src/mesa/pipe/softpipe
parent86352ff70d8c9a31fe0ebb4d02ce4bb4644fe54a (diff)
Rename prim_stage -> draw_stage
Diffstat (limited to 'src/mesa/pipe/softpipe')
-rw-r--r--src/mesa/pipe/softpipe/sp_context.c5
-rw-r--r--src/mesa/pipe/softpipe/sp_context.h2
-rw-r--r--src/mesa/pipe/softpipe/sp_prim_setup.c29
-rw-r--r--src/mesa/pipe/softpipe/sp_prim_setup.h2
-rw-r--r--src/mesa/pipe/softpipe/sp_state_setup.c2
5 files changed, 25 insertions, 15 deletions
diff --git a/src/mesa/pipe/softpipe/sp_context.c b/src/mesa/pipe/softpipe/sp_context.c
index 671ef2764b..d3aea3698a 100644
--- a/src/mesa/pipe/softpipe/sp_context.c
+++ b/src/mesa/pipe/softpipe/sp_context.c
@@ -98,5 +98,10 @@ struct pipe_context *softpipe_create( void )
softpipe->draw = draw_create();
draw_set_setup_stage(softpipe->draw, prim_setup(softpipe));
+ /*
+ * XXX we could plug GL selection/feedback into the drawing pipeline
+ * by specifying a different setup/render stage.
+ */
+
return &softpipe->pipe;
}
diff --git a/src/mesa/pipe/softpipe/sp_context.h b/src/mesa/pipe/softpipe/sp_context.h
index 47ce2f0ad8..3ae1de71cf 100644
--- a/src/mesa/pipe/softpipe/sp_context.h
+++ b/src/mesa/pipe/softpipe/sp_context.h
@@ -41,7 +41,7 @@
struct softpipe_surface;
struct draw_context;
-struct prim_stage;
+struct draw_stage;
enum interp_mode {
diff --git a/src/mesa/pipe/softpipe/sp_prim_setup.c b/src/mesa/pipe/softpipe/sp_prim_setup.c
index b194f14c03..5db05ecccb 100644
--- a/src/mesa/pipe/softpipe/sp_prim_setup.c
+++ b/src/mesa/pipe/softpipe/sp_prim_setup.c
@@ -25,9 +25,14 @@
*
**************************************************************************/
-/* Authors: Keith Whitwell <keith@tungstengraphics.com>
+/**
+ * \brief Primitive rasterization/rendering (points, lines, triangles)
+ *
+ * \author Keith Whitwell <keith@tungstengraphics.com>
+ * \author Brian Paul
*/
+
#include "imports.h"
#include "macros.h"
@@ -64,11 +69,11 @@ struct edge {
/**
- * Triangle setup info (derived from prim_stage).
+ * Triangle setup info (derived from draw_stage).
* Also used for line drawing (taking some liberties).
*/
struct setup_stage {
- struct prim_stage stage; /**< This must be first (base class) */
+ struct draw_stage stage; /**< This must be first (base class) */
/*XXX NEW */
struct softpipe_context *softpipe;
@@ -105,7 +110,7 @@ struct setup_stage {
/**
* Basically a cast wrapper.
*/
-static inline struct setup_stage *setup_stage( struct prim_stage *stage )
+static inline struct setup_stage *setup_stage( struct draw_stage *stage )
{
return (struct setup_stage *)stage;
}
@@ -122,7 +127,7 @@ static inline GLint block( GLint x )
-static void setup_begin( struct prim_stage *stage )
+static void setup_begin( struct draw_stage *stage )
{
struct setup_stage *setup = setup_stage(stage);
@@ -559,7 +564,7 @@ static void subtriangle( struct setup_stage *setup,
/**
* Do setup for triangle rasterization, then render the triangle.
*/
-static void setup_tri( struct prim_stage *stage,
+static void setup_tri( struct draw_stage *stage,
struct prim_header *prim )
{
struct setup_stage *setup = setup_stage( stage );
@@ -576,9 +581,9 @@ static void setup_tri( struct prim_stage *stage,
setup->span.y_flags = 0;
setup->span.right[0] = 0;
setup->span.right[1] = 0;
-// setup->span.z_mode = tri_z_mode( setup->ctx );
+ /* setup->span.z_mode = tri_z_mode( setup->ctx ); */
-// init_constant_attribs( setup );
+ /* init_constant_attribs( setup ); */
if (setup->oneoverarea < 0.0) {
/* emaj on left:
@@ -714,7 +719,7 @@ plot(struct setup_stage *setup, GLint x, GLint y)
* XXX no scissoring yet.
*/
static void
-setup_line(struct prim_stage *stage, struct prim_header *prim)
+setup_line(struct draw_stage *stage, struct prim_header *prim)
{
const struct vertex_header *v0 = prim->v[0];
const struct vertex_header *v1 = prim->v[1];
@@ -810,7 +815,7 @@ setup_line(struct prim_stage *stage, struct prim_header *prim)
* XXX could optimize a lot for 1-pixel points.
*/
static void
-setup_point(struct prim_stage *stage, struct prim_header *prim)
+setup_point(struct draw_stage *stage, struct prim_header *prim)
{
struct setup_stage *setup = setup_stage( stage );
/*XXX this should be a vertex attrib! */
@@ -923,7 +928,7 @@ setup_point(struct prim_stage *stage, struct prim_header *prim)
-static void setup_end( struct prim_stage *stage )
+static void setup_end( struct draw_stage *stage )
{
}
@@ -931,7 +936,7 @@ static void setup_end( struct prim_stage *stage )
/**
* Create a new primitive setup/render stage.
*/
-struct prim_stage *prim_setup( struct softpipe_context *softpipe )
+struct draw_stage *prim_setup( struct softpipe_context *softpipe )
{
struct setup_stage *setup = CALLOC_STRUCT(setup_stage);
diff --git a/src/mesa/pipe/softpipe/sp_prim_setup.h b/src/mesa/pipe/softpipe/sp_prim_setup.h
index 4d26c05458..be00b0182b 100644
--- a/src/mesa/pipe/softpipe/sp_prim_setup.h
+++ b/src/mesa/pipe/softpipe/sp_prim_setup.h
@@ -43,7 +43,7 @@
#include "s_context.h"
-extern struct prim_stage *prim_setup( struct softpipe_context *softpipe );
+extern struct draw_stage *prim_setup( struct softpipe_context *softpipe );
#if 0 /* UNUSED? */
diff --git a/src/mesa/pipe/softpipe/sp_state_setup.c b/src/mesa/pipe/softpipe/sp_state_setup.c
index 6dbb87ae79..cef70d42d9 100644
--- a/src/mesa/pipe/softpipe/sp_state_setup.c
+++ b/src/mesa/pipe/softpipe/sp_state_setup.c
@@ -34,7 +34,7 @@
#if 0
static void validate_prim_pipe( struct softpipe_context *softpipe )
{
- struct prim_stage *next = softpipe->prim.setup;
+ struct draw_stage *next = softpipe->prim.setup;
/* TODO: make the current primitive part of the state and build
* shorter pipelines for lines & points.