softpipe: implement SP_NO_RAST env var
This commit is contained in:
parent
09b6686158
commit
a5b87f249e
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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???
|
||||
|
|
Loading…
Reference in New Issue