softpipe: implement SP_NO_RAST env var

This commit is contained in:
Keith Whitwell 2008-04-22 11:01:41 +01:00
parent 09b6686158
commit a5b87f249e
4 changed files with 18 additions and 0 deletions

View File

@ -49,6 +49,9 @@ softpipe_clear(struct pipe_context *pipe, struct pipe_surface *ps,
struct softpipe_context *softpipe = softpipe_context(pipe);
uint i;
if (softpipe->no_rast)
return;
#if 0
softpipe_update_derived(softpipe); /* not needed?? */
#endif

View File

@ -219,6 +219,9 @@ softpipe_create( struct pipe_screen *screen,
assert(softpipe->draw);
softpipe->setup = sp_draw_render_stage(softpipe);
if (GETENV( "SP_NO_RAST" ) != NULL)
softpipe->no_rast = TRUE;
if (GETENV( "SP_VBUF" ) != NULL) {
sp_init_vbuf(softpipe);
}

View File

@ -86,6 +86,8 @@ struct softpipe_context {
unsigned num_vertex_elements;
unsigned num_vertex_buffers;
boolean no_rast;
/* Counter for occlusion queries. Note this supports overlapping
* queries.
*/

View File

@ -726,6 +726,9 @@ void setup_tri( struct setup_context *setup,
{
float det = calc_det(v0, v1, v2);
if (setup->softpipe->no_rast)
return;
/*
debug_printf("%s\n", __FUNCTION__ );
*/
@ -934,6 +937,9 @@ setup_line(struct setup_context *setup,
int dy = y1 - y0;
int xstep, ystep;
if (setup->softpipe->no_rast)
return;
if (dx == 0 && dy == 0)
return;
@ -1052,6 +1058,10 @@ setup_point( struct setup_context *setup,
const struct vertex_info *vinfo = softpipe_get_vertex_info(softpipe);
uint fragSlot;
if (softpipe->no_rast)
return;
/* For points, all interpolants are constant-valued.
* However, for point sprites, we'll need to setup texcoords appropriately.
* XXX: which coefficients are the texcoords???