framebuffer state
authorBrian <brian.paul@tungstengraphics.com>
Fri, 15 Jun 2007 16:54:08 +0000 (10:54 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Fri, 15 Jun 2007 16:54:08 +0000 (10:54 -0600)
src/mesa/pipe/softpipe/sp_context.c
src/mesa/pipe/softpipe/sp_context.h
src/mesa/pipe/softpipe/sp_state.h
src/mesa/pipe/softpipe/sp_state_surface.c

index 8e547cbdc39a22848816d6b4af0e11540f519695..9a054265fb12a6a958044ab35aa46bf345adc9bc 100644 (file)
@@ -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;
index 9050b59f77c1a4ca94ef1d80a883771a2f5eef4c..f2ebc4272a63faa0ca0722d79dc4f49b99331b30 100644 (file)
@@ -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 {     
index 2abefc6037250b4a533979470ef9d30ff46bcf43..14afce157e88b04dfac4f1bbc4c6070ff55d4ce2 100644 (file)
@@ -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 * );
 
index 989f2e29d8cb6e2ff6a95b084d1801265bd24034..d089fe063229e0d60b4dfead363037690275edc6 100644 (file)
@@ -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;
+}
+
+