s/prim_setup/sp_draw_render_stage/, new comments
This commit is contained in:
@@ -93,10 +93,10 @@ struct pipe_context *softpipe_create( void )
|
|||||||
softpipe->quad.output = sp_quad_output_stage(softpipe);
|
softpipe->quad.output = sp_quad_output_stage(softpipe);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create drawing context and plug our render/setup stage into it.
|
* Create drawing context and plug our rendering stage into it.
|
||||||
*/
|
*/
|
||||||
softpipe->draw = draw_create();
|
softpipe->draw = draw_create();
|
||||||
draw_set_setup_stage(softpipe->draw, prim_setup(softpipe));
|
draw_set_setup_stage(softpipe->draw, sp_draw_render_stage(softpipe));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* XXX we could plug GL selection/feedback into the drawing pipeline
|
* XXX we could plug GL selection/feedback into the drawing pipeline
|
||||||
|
@@ -127,14 +127,6 @@ static inline GLint block( GLint x )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void setup_begin( struct draw_stage *stage )
|
|
||||||
{
|
|
||||||
struct setup_stage *setup = setup_stage(stage);
|
|
||||||
|
|
||||||
setup->quad.nr_attrs = setup->softpipe->nr_frag_attrs;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run shader on a quad/block.
|
* Run shader on a quad/block.
|
||||||
*/
|
*/
|
||||||
@@ -928,15 +920,32 @@ setup_point(struct draw_stage *stage, struct prim_header *prim)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void setup_begin( struct draw_stage *stage )
|
||||||
|
{
|
||||||
|
struct setup_stage *setup = setup_stage(stage);
|
||||||
|
|
||||||
|
setup->quad.nr_attrs = setup->softpipe->nr_frag_attrs;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* XXX this is where we might map() the renderbuffers to begin
|
||||||
|
* s/w rendering.
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void setup_end( struct draw_stage *stage )
|
static void setup_end( struct draw_stage *stage )
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* XXX this is where we might unmap() the renderbuffers after
|
||||||
|
* s/w rendering.
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new primitive setup/render stage.
|
* Create a new primitive setup/render stage.
|
||||||
*/
|
*/
|
||||||
struct draw_stage *prim_setup( struct softpipe_context *softpipe )
|
struct draw_stage *sp_draw_render_stage( struct softpipe_context *softpipe )
|
||||||
{
|
{
|
||||||
struct setup_stage *setup = CALLOC_STRUCT(setup_stage);
|
struct setup_stage *setup = CALLOC_STRUCT(setup_stage);
|
||||||
|
|
||||||
|
@@ -22,8 +22,10 @@
|
|||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef S_TRI_H
|
|
||||||
#define S_TRI_H
|
#ifndef SP_PRIM_SETUP_H
|
||||||
|
#define SP_PRIM_SETUP_H
|
||||||
|
|
||||||
|
|
||||||
/* Vertices are just an array of floats, with all the attributes
|
/* Vertices are just an array of floats, with all the attributes
|
||||||
* packed. We currently assume a layout like:
|
* packed. We currently assume a layout like:
|
||||||
@@ -43,7 +45,7 @@
|
|||||||
#include "s_context.h"
|
#include "s_context.h"
|
||||||
|
|
||||||
|
|
||||||
extern struct draw_stage *prim_setup( struct softpipe_context *softpipe );
|
extern struct draw_stage *sp_draw_render_stage( struct softpipe_context *softpipe );
|
||||||
|
|
||||||
|
|
||||||
#if 0 /* UNUSED? */
|
#if 0 /* UNUSED? */
|
||||||
@@ -104,11 +106,6 @@ void tri_triangle( struct tri_context *tri,
|
|||||||
|
|
||||||
#ifdef SETUP_PRIVATE
|
#ifdef SETUP_PRIVATE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
GLboolean tri_setup( struct tri_context *tri,
|
GLboolean tri_setup( struct tri_context *tri,
|
||||||
const struct vertex *v0,
|
const struct vertex *v0,
|
||||||
const struct vertex *v1,
|
const struct vertex *v1,
|
||||||
@@ -117,11 +114,9 @@ GLboolean tri_setup( struct tri_context *tri,
|
|||||||
void tri_rasterize( struct tri_context *tri );
|
void tri_rasterize( struct tri_context *tri );
|
||||||
void tri_rasterize_spans( struct tri_context *tri );
|
void tri_rasterize_spans( struct tri_context *tri );
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
#endif
|
#endif /* SP_PRIM_SETUP_H */
|
||||||
|
Reference in New Issue
Block a user