summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/softpipe')
-rw-r--r--src/gallium/drivers/softpipe/sp_clear.c3
-rw-r--r--src/gallium/drivers/softpipe/sp_context.c3
-rw-r--r--src/gallium/drivers/softpipe/sp_context.h2
-rw-r--r--src/gallium/drivers/softpipe/sp_setup.c10
4 files changed, 18 insertions, 0 deletions
diff --git a/src/gallium/drivers/softpipe/sp_clear.c b/src/gallium/drivers/softpipe/sp_clear.c
index 39aed151c7..1236706891 100644
--- a/src/gallium/drivers/softpipe/sp_clear.c
+++ b/src/gallium/drivers/softpipe/sp_clear.c
@@ -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
diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c
index 8c84ddbe19..200fb415ac 100644
--- a/src/gallium/drivers/softpipe/sp_context.c
+++ b/src/gallium/drivers/softpipe/sp_context.c
@@ -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);
}
diff --git a/src/gallium/drivers/softpipe/sp_context.h b/src/gallium/drivers/softpipe/sp_context.h
index 0e1d5e561d..b3e2b2e435 100644
--- a/src/gallium/drivers/softpipe/sp_context.h
+++ b/src/gallium/drivers/softpipe/sp_context.h
@@ -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.
*/
diff --git a/src/gallium/drivers/softpipe/sp_setup.c b/src/gallium/drivers/softpipe/sp_setup.c
index 813d703108..0bf2b2dc3e 100644
--- a/src/gallium/drivers/softpipe/sp_setup.c
+++ b/src/gallium/drivers/softpipe/sp_setup.c
@@ -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???