summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/softpipe
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/softpipe')
-rw-r--r--src/mesa/pipe/softpipe/sp_context.c2
-rw-r--r--src/mesa/pipe/softpipe/sp_flush.c19
-rw-r--r--src/mesa/pipe/softpipe/sp_flush.h2
-rw-r--r--src/mesa/pipe/softpipe/sp_winsys.h12
4 files changed, 29 insertions, 6 deletions
diff --git a/src/mesa/pipe/softpipe/sp_context.c b/src/mesa/pipe/softpipe/sp_context.c
index 0794d9a888..db572f169d 100644
--- a/src/mesa/pipe/softpipe/sp_context.c
+++ b/src/mesa/pipe/softpipe/sp_context.c
@@ -221,7 +221,7 @@ struct pipe_context *softpipe_create( struct softpipe_winsys *sws )
softpipe->pipe.draw_vertices = softpipe_draw_vertices;
softpipe->pipe.clear = softpipe_clear;
softpipe->pipe.flush = softpipe_flush;
- softpipe->pipe.finish = softpipe_finish;
+ softpipe->pipe.wait_idle = softpipe_wait_idle;
softpipe->pipe.reset_occlusion_counter = softpipe_reset_occlusion_counter;
softpipe->pipe.get_occlusion_counter = softpipe_get_occlusion_counter;
diff --git a/src/mesa/pipe/softpipe/sp_flush.c b/src/mesa/pipe/softpipe/sp_flush.c
index aa609469a6..a0bce200ed 100644
--- a/src/mesa/pipe/softpipe/sp_flush.c
+++ b/src/mesa/pipe/softpipe/sp_flush.c
@@ -33,6 +33,7 @@
#include "pipe/p_defines.h"
#include "sp_flush.h"
#include "sp_context.h"
+#include "sp_winsys.h"
/* There will be actual work to do here. In future we may want a
* fence-like interface instead of finish, and perhaps flush will take
@@ -49,9 +50,21 @@ softpipe_flush( struct pipe_context *pipe,
}
void
-softpipe_finish(struct pipe_context *pipe)
+softpipe_wait_idle(struct pipe_context *pipe)
{
- /* Just calls into flush()
+ /* Nothing to do.
+ * XXX: What about swapbuffers.
+ * XXX: Even more so - what about fake frontbuffer copies??
*/
- softpipe_flush( pipe, 0 );
+ struct softpipe_context *softpipe = softpipe_context(pipe);
+ softpipe->winsys->wait_idle( softpipe->winsys );
+}
+
+
+void
+softpipe_flush_frontbuffer( struct pipe_context *pipe )
+{
+ struct softpipe_context *softpipe = softpipe_context(pipe);
+
+ softpipe->winsys->flush_frontbuffer( softpipe->winsys );
}
diff --git a/src/mesa/pipe/softpipe/sp_flush.h b/src/mesa/pipe/softpipe/sp_flush.h
index 5e204f87a5..03c0010623 100644
--- a/src/mesa/pipe/softpipe/sp_flush.h
+++ b/src/mesa/pipe/softpipe/sp_flush.h
@@ -30,7 +30,7 @@
struct pipe_context;
-void softpipe_finish(struct pipe_context *pipe);
void softpipe_flush(struct pipe_context *pipe, unsigned flags );
+void softpipe_wait_idle(struct pipe_context *pipe);
#endif
diff --git a/src/mesa/pipe/softpipe/sp_winsys.h b/src/mesa/pipe/softpipe/sp_winsys.h
index 6f6d0f2446..73b0659067 100644
--- a/src/mesa/pipe/softpipe/sp_winsys.h
+++ b/src/mesa/pipe/softpipe/sp_winsys.h
@@ -50,9 +50,19 @@ struct pipe_buffer_handle;
struct softpipe_winsys {
+ /* Do any special operations to ensure frontbuffer contents are
+ * displayed, eg copy fake frontbuffer.
+ */
+ void (*flush_frontbuffer)( struct softpipe_winsys *sws );
+
+ /* Wait for any hw swapbuffers, etc. to finish:
+ */
+ void (*wait_idle)( struct softpipe_winsys *sws );
+
/* debug output
*/
- void (*printf)( const char *, ... );
+ void (*printf)( struct softpipe_winsys *sws,
+ const char *, ... );
/* The buffer manager is modeled after the dri_bugmgr interface,