summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/softpipe
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2007-08-21 19:46:48 +0100
committerKeith Whitwell <keith@tungstengraphics.com>2007-08-21 19:46:48 +0100
commitce4659e92acfbb0ff8a93a6e619c44b839505ca9 (patch)
treea03a38deaf7008735153f30a60f4ea27380fe9d4 /src/mesa/pipe/softpipe
parent93c7173ed2fbe2bc47ee6879af89366cafd90ba5 (diff)
First pass at a fallback concept for pipe devices.
Creates a new pipe driver that feeds commands to either a hardware or software pipe depending on fallback state. Untested concept checkpoint. At this point it compiles.
Diffstat (limited to 'src/mesa/pipe/softpipe')
-rw-r--r--src/mesa/pipe/softpipe/sp_draw_arrays.c10
-rw-r--r--src/mesa/pipe/softpipe/sp_state.h12
2 files changed, 12 insertions, 10 deletions
diff --git a/src/mesa/pipe/softpipe/sp_draw_arrays.c b/src/mesa/pipe/softpipe/sp_draw_arrays.c
index 9ced89cd7c..0392b6b64e 100644
--- a/src/mesa/pipe/softpipe/sp_draw_arrays.c
+++ b/src/mesa/pipe/softpipe/sp_draw_arrays.c
@@ -43,11 +43,11 @@
-void
+boolean
softpipe_draw_arrays(struct pipe_context *pipe, unsigned mode,
unsigned start, unsigned count)
{
- softpipe_draw_elements(pipe, NULL, 0, mode, start, count);
+ return softpipe_draw_elements(pipe, NULL, 0, mode, start, count);
}
@@ -59,7 +59,7 @@ softpipe_draw_arrays(struct pipe_context *pipe, unsigned mode,
*
* XXX should the element buffer be specified/bound with a separate function?
*/
-void
+boolean
softpipe_draw_elements(struct pipe_context *pipe,
struct pipe_buffer_handle *indexBuffer,
unsigned indexSize,
@@ -73,7 +73,7 @@ softpipe_draw_elements(struct pipe_context *pipe,
draw_prim_info( mode, &first, &incr );
length = draw_trim( count, first, incr );
if (!length)
- return;
+ return TRUE;
if (sp->dirty)
@@ -123,4 +123,6 @@ softpipe_draw_elements(struct pipe_context *pipe,
}
softpipe_unmap_surfaces(sp);
+
+ return TRUE;
}
diff --git a/src/mesa/pipe/softpipe/sp_state.h b/src/mesa/pipe/softpipe/sp_state.h
index 49fef0ddce..5e1ecd94e0 100644
--- a/src/mesa/pipe/softpipe/sp_state.h
+++ b/src/mesa/pipe/softpipe/sp_state.h
@@ -95,13 +95,13 @@ void softpipe_set_vertex_buffer(struct pipe_context *,
void softpipe_update_derived( struct softpipe_context *softpipe );
-void softpipe_draw_arrays(struct pipe_context *pipe, unsigned mode,
- unsigned start, unsigned count);
+boolean softpipe_draw_arrays(struct pipe_context *pipe, unsigned mode,
+ unsigned start, unsigned count);
-void softpipe_draw_elements(struct pipe_context *pipe,
- struct pipe_buffer_handle *indexBuffer,
- unsigned indexSize,
- unsigned mode, unsigned start, unsigned count);
+boolean softpipe_draw_elements(struct pipe_context *pipe,
+ struct pipe_buffer_handle *indexBuffer,
+ unsigned indexSize,
+ unsigned mode, unsigned start, unsigned count);
void