/* Authors: Keith Whitwell <keith@tungstengraphics.com>
*/
-#include "imports.h"
-
#include "sp_context.h"
#include "sp_state.h"
#include "sp_surface.h"
-/* This is all a total hack.
+/*
+ * XXX this might get moved someday
*/
-void softpipe_set_cbuf_state( struct pipe_context *pipe,
- const struct pipe_surface *surface )
+void
+softpipe_set_framebuffer_state(struct pipe_context *pipe,
+ const struct pipe_framebuffer_state *fb)
{
struct softpipe_context *softpipe = softpipe_context(pipe);
- if (softpipe->cbuf_surface == NULL) {
- softpipe->cbuf_surface = CALLOC_STRUCT(softpipe_surface);
- softpipe->cbuf_surface->type = &gs_rgba8;
- }
+ softpipe->framebuffer = *fb; /* struct copy */
- softpipe->cbuf_surface->surface = *surface;
- softpipe->dirty |= G_NEW_CBUF;
+ softpipe->dirty |= SP_NEW_FRAMEBUFFER;
}
-/*
- * XXX this might get moved someday
- */
-void softpipe_set_framebuffer_state( struct pipe_context *pipe,
- const struct pipe_framebuffer_state *fb )
+
+
+void
+softpipe_set_clear_color_state(struct pipe_context *pipe,
+ const struct pipe_clear_color_state *clear)
{
struct softpipe_context *softpipe = softpipe_context(pipe);
- softpipe->framebuffer = *fb; /* struct copy */
-
- softpipe->dirty |= G_NEW_FRAMEBUFFER;
+ softpipe->clear_color = *clear; /* struct copy */
}
-
-