summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/softpipe
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-06-15 10:54:08 -0600
committerBrian <[email protected]>2007-06-15 10:54:08 -0600
commit1119852d0272c5ae43b09024b61f6e53c356ee65 (patch)
tree9a49c2a6acde60993ee560837890d86a822f81eb /src/mesa/pipe/softpipe
parentfde755aefb3559731a734110c7172badee9f14f9 (diff)
framebuffer state
Diffstat (limited to 'src/mesa/pipe/softpipe')
-rw-r--r--src/mesa/pipe/softpipe/sp_context.c1
-rw-r--r--src/mesa/pipe/softpipe/sp_context.h2
-rw-r--r--src/mesa/pipe/softpipe/sp_state.h3
-rw-r--r--src/mesa/pipe/softpipe/sp_state_surface.c14
4 files changed, 19 insertions, 1 deletions
diff --git a/src/mesa/pipe/softpipe/sp_context.c b/src/mesa/pipe/softpipe/sp_context.c
index 8e547cbdc39..9a054265fb1 100644
--- a/src/mesa/pipe/softpipe/sp_context.c
+++ b/src/mesa/pipe/softpipe/sp_context.c
@@ -66,6 +66,7 @@ struct pipe_context *softpipe_create( void )
struct softpipe_context *softpipe = CALLOC_STRUCT(softpipe_context);
softpipe->pipe.destroy = softpipe_destroy;
+ softpipe->pipe.set_framebuffer_state = softpipe_set_framebuffer_state;
softpipe->pipe.set_clip_state = softpipe_set_clip_state;
softpipe->pipe.set_viewport = softpipe_set_viewport;
softpipe->pipe.set_setup_state = softpipe_set_setup_state;
diff --git a/src/mesa/pipe/softpipe/sp_context.h b/src/mesa/pipe/softpipe/sp_context.h
index 9050b59f77c..f2ebc4272a6 100644
--- a/src/mesa/pipe/softpipe/sp_context.h
+++ b/src/mesa/pipe/softpipe/sp_context.h
@@ -58,7 +58,7 @@ enum interp_mode {
#define G_NEW_CLIP 0x20
#define G_NEW_SCISSOR 0x40
#define G_NEW_STIPPLE 0x80
-
+#define G_NEW_FRAMEBUFFER 0x100
struct softpipe_context {
diff --git a/src/mesa/pipe/softpipe/sp_state.h b/src/mesa/pipe/softpipe/sp_state.h
index 2abefc60372..14afce157e8 100644
--- a/src/mesa/pipe/softpipe/sp_state.h
+++ b/src/mesa/pipe/softpipe/sp_state.h
@@ -35,6 +35,9 @@
#include "pipe/p_state.h"
+void softpipe_set_framebuffer_state( struct pipe_context *,
+ const struct pipe_framebuffer_state * );
+
void softpipe_set_clip_state( struct pipe_context *,
const struct pipe_clip_state * );
diff --git a/src/mesa/pipe/softpipe/sp_state_surface.c b/src/mesa/pipe/softpipe/sp_state_surface.c
index 989f2e29d8c..d089fe06322 100644
--- a/src/mesa/pipe/softpipe/sp_state_surface.c
+++ b/src/mesa/pipe/softpipe/sp_state_surface.c
@@ -51,3 +51,17 @@ void softpipe_set_cbuf_state( struct pipe_context *pipe,
}
+/*
+ * XXX this might get moved someday
+ */
+void softpipe_set_framebuffer_state( struct pipe_context *pipe,
+ const struct pipe_framebuffer_state *fb )
+{
+ struct softpipe_context *softpipe = softpipe_context(pipe);
+
+ softpipe->framebuffer = *fb; /* struct copy */
+
+ softpipe->dirty |= G_NEW_FRAMEBUFFER;
+}
+
+